﻿/* FRYNZY Player & Native Bottom Nav Styles */

:root {
    --sat: 28px;
    --sab: 0px;
    --sal: 0px;
    --sar: 0px;
    --sat-hw: 28px;
    --sab-hw: 0px;
}

/* 1. Hide the old cone download floating button */
.download-manager-widget {
    display: none !important;
}

/* Full-height app viewport: Zero body padding, scrolling is internal to each tab-screen */
html, body {
    height: 100% !important;
    max-height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    /* Prevent callout/selection on long press */
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* ============================================================
 * PERFORMANCE: Eliminate 300ms tap delay on ALL interactive elements
 * touch-action:manipulation = no double-tap zoom = instant response
 * ============================================================ */
*, *::before, *::after {
    -webkit-tap-highlight-color: transparent;
}

button, a, [onclick], [role="button"],
.frynzy-nav-item, .frynzy-tab-btn, .frynzy-bottom-nav-item,
.gfiles-folder-card, .gfiles-media-card, .gfiles-media-row,
.gfiles-sort-row, .gfiles-dropdown-item, .gfiles-sheet-row,
.gfiles-breadcrumb-segment, .gfiles-card-select-circle,
.frynzy-player-btn, .frynzy-mini-player-btn,
.frynzy-option-item, .frynzy-bottom-sheet-item,
input[type="range"] {
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
    cursor: pointer;
}

/* GPU-composite fixed/sticky elements to avoid repaint on scroll */
.frynzy-player-modal,
.frynzy-mini-player,
.gfiles-bottom-sheet,
.frynzy-cat-topbar,
.gfiles-cat-topbar {
    will-change: transform;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

/* 2. Bottom Navigation Bar — iPhone Frosted Glass Capsule & Active Pill */
.frynzy-bottom-nav,
#frynzyBottomNav {
    position: fixed !important;
    bottom: 10px !important;
    left: 12px !important;
    right: 12px !important;
    margin: 0 auto !important;
    max-width: 440px !important;
    height: 58px !important;
    min-height: 58px !important;
    background: rgba(255, 255, 255, 0.76) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.65) !important;
    border-radius: 34px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.05) !important;
    z-index: 2900 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 4px 6px !important;
    gap: 4px !important;
    box-sizing: border-box !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    -webkit-backface-visibility: hidden !important;
    backface-visibility: hidden !important;
    transform: none !important;
    -webkit-transform: none !important;
    will-change: auto !important;
}

body.dark-theme #frynzyBottomNav,
body.dark-theme .frynzy-bottom-nav {
    background: rgba(26, 26, 32, 0.76) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    box-shadow: 0 10px 34px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.25) !important;
}

.frynzy-tab-btn {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2px !important;
    background: transparent !important;
    border: none !important;
    color: #64748b !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    padding: 5px 4px !important;
    border-radius: 26px !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    transition: color 0.18s ease !important;
    outline: none !important;
    height: 48px !important;
    max-height: 48px !important;
    box-sizing: border-box !important;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-backface-visibility: hidden !important;
    backface-visibility: hidden !important;
    transform: translateZ(0) !important;
}

.frynzy-tab-btn i {
    font-size: 17px !important;
    color: #64748b !important;
    display: inline-block !important;
    -webkit-backface-visibility: hidden !important;
    backface-visibility: hidden !important;
    transform: translateZ(0) !important;
    -webkit-transform: translateZ(0) !important;
    transition: color 0.18s ease !important;
    will-change: color !important;
    text-rendering: optimizeLegibility !important;
    -webkit-font-smoothing: antialiased !important;
}

.frynzy-tab-btn span {
    color: #64748b !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    line-height: 1.15 !important;
    letter-spacing: -0.2px !important;
    transition: color 0.18s ease !important;
}

body.dark-theme .frynzy-tab-btn,
body.dark-theme .frynzy-tab-btn i,
body.dark-theme .frynzy-tab-btn span {
    color: rgba(255, 255, 255, 0.65) !important;
}

.frynzy-tab-btn:active {
    opacity: 0.85 !important;
}

/* ACTIVE PILL — Identical to Camera Flash/HD popout tray (.frynzy-cam-pill-btn.active) */
.frynzy-tab-btn.active {
    background: transparent !important;
    color: #000000 !important;
    transform: translateZ(0) !important;
}

.frynzy-tab-btn.active i {
    color: #000000 !important;
    transform: translateZ(0) !important;
}

.frynzy-tab-btn.active span {
    color: #000000 !important;
    font-weight: 700 !important;
}

body.dark-theme .frynzy-tab-btn.active {
    background: transparent !important;
    color: #ffffff !important;
}

body.dark-theme .frynzy-tab-btn.active i,
body.dark-theme .frynzy-tab-btn.active span {
    color: #ffffff !important;
}

.nav-icon-badge-wrap {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.nav-download-badge {
    position: absolute !important;
    top: -5px !important;
    right: -10px !important;
    background: #ef4444 !important;
    color: #ffffff !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    padding: 1px 5px !important;
    border-radius: 10px !important;
    line-height: 1.2 !important;
    border: 1.5px solid #ffffff !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25) !important;
}

.frynzy-tab-btn.active .nav-download-badge {
    border-color: #000000 !important;
}

/* 3. Tab Screens */
.tab-screen {
    width: 100%;
}

.lecture-screen-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 16px 14px 40px;
}

.lecture-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 4px 2px;
}

.lecture-header-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.lecture-header-title i {
    color: #7f00ff;
}

.lecture-header-desc {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 4px;
}

/* 4. Live Downloads Hub */
.dl-hub-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 16px;
    border: 1.5px solid #e2e8f0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    margin-bottom: 24px;
}

.dl-hub-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.dl-hub-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dl-hub-icon-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff007f 0%, #7f00ff 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    box-shadow: 0 4px 10px rgba(127, 0, 255, 0.3);
}

.dl-hub-title {
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}

.dl-hub-count-badge {
    background: #fdf2f8;
    color: #db2777;
    border: 1px solid #fbcfe8;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 999px;
    animation: pulseBadge 1.5s infinite alternate;
}

@keyframes pulseBadge {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

.dl-empty-state {
    text-align: center;
    padding: 24px 16px;
    color: #94a3b8;
}

.dl-empty-state i {
    font-size: 2.2rem;
    color: #cbd5e1;
    margin-bottom: 8px;
}

.dl-empty-state p {
    margin: 0 0 4px;
    font-weight: 700;
    color: #475569;
    font-size: 0.95rem;
}

.dl-empty-state span {
    font-size: 0.8rem;
}

.active-dl-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 10px;
    transition: background 0.2s;
}

.active-dl-thumb {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    background: #0f172a;
    flex-shrink: 0;
}

.active-dl-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.active-dl-info {
    flex: 1;
    min-width: 0;
}

.active-dl-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.active-dl-meta {
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 6px;
}

.active-dl-progress-track {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}

.active-dl-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #ff007f 0%, #7f00ff 100%);
    border-radius: 999px;
    transition: width 0.3s ease;
}

.active-dl-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 4px;
}

.btn-dl-ctrl {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
    outline: none;
}

.btn-dl-ctrl:active {
    transform: scale(0.88);
}

.btn-dl-pause {
    background: #fef08a;
    color: #854d0e;
}

.btn-dl-resume {
    background: #dcfce7;
    color: #166534;
}

.btn-dl-stop {
    background: #fee2e2;
    color: #991b1b;
}

.active-dl-pct {
    font-size: 0.82rem;
    font-weight: 800;
    color: #7f00ff;
    min-width: 42px;
    text-align: right;
}

/* 5. Media Filter Bar */
.media-filter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}

.media-filter-bar::-webkit-scrollbar {
    display: none;
}

.media-filter-btn {
    border-radius: 999px;
    padding: 8px 18px;
    border: 1.5px solid #e2e8f0;
    background: #ffffff;
    font-size: 0.85rem;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    outline: none;
}

.media-filter-btn.active {
    background: linear-gradient(135deg, #ff007f 0%, #7f00ff 100%);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(127, 0, 255, 0.25);
}

.media-filter-refresh {
    margin-left: auto;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid #e2e8f0;
    background: #ffffff;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s;
}

.media-filter-refresh:active {
    transform: rotate(180deg);
}

/* 6. Media Grid & Cards - Grands encadrements modernes */
.local-media-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

@media (min-width: 520px) {
    .local-media-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 18px;
    }
}

@media (min-width: 860px) {
    .local-media-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 20px;
    }
}

.media-card {
    background: #ffffff;
    border-radius: 18px;
    overflow: hidden;
    border: 1.5px solid #e2e8f0;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.media-card:hover {
    box-shadow: 0 8px 26px rgba(127, 0, 255, 0.12);
    border-color: #cbd5e1;
}

.media-card:active {
    transform: scale(0.98);
}

.media-card-thumb {
    width: 100%;
    height: 195px;
    position: relative;
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.media-card-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    transition: transform 0.35s ease;
}

.media-card:hover .media-card-img {
    transform: scale(1.05);
}

.media-card-gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.12) 0%, rgba(0, 0, 0, 0.65) 100%);
    z-index: 2;
    pointer-events: none;
}

.video-thumb {
    background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 100%);
}

.audio-thumb {
    background: linear-gradient(135deg, #311042 0%, #1e1b4b 100%);
}

.img-thumb {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.play-overlay-icon {
    font-size: 2.8rem;
    color: #ffffff;
    filter: drop-shadow(0 3px 12px rgba(0, 0, 0, 0.7));
    transition: transform 0.2s ease;
    position: relative;
    z-index: 3;
}

.media-card:hover .play-overlay-icon {
    transform: scale(1.15);
}

.audio-disc-preview {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: radial-gradient(circle, #7f00ff 25%, #111 60%);
    border: 2px solid rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.4rem;
    position: relative;
    z-index: 3;
    box-shadow: 0 4px 14px rgba(0,0,0,0.5);
}

.badge-type {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    color: #ffffff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.badge-video {
    background: rgba(127, 0, 255, 0.85);
}

.badge-audio {
    background: rgba(255, 0, 127, 0.85);
}

.badge-image {
    background: rgba(6, 182, 212, 0.85);
}

.badge-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.75);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
}

.media-card-body {
    padding: 10px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.media-card-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #0f172a;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.35;
    margin-bottom: 6px;
}

.media-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.72rem;
    color: #64748b;
    margin-top: 4px;
}

.media-card-actions {
    position: absolute;
    top: 6px;
    right: 6px;
}

.btn-media-opt {
    background: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
    transition: background 0.2s;
}

.btn-media-opt:hover {
    background: #ef4444;
}

.media-empty, .media-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 16px;
    color: #94a3b8;
}

.media-empty i {
    font-size: 2.8rem;
    color: #cbd5e1;
    margin-bottom: 10px;
}

.media-empty p {
    font-size: 1rem;
    font-weight: 700;
    color: #475569;
    margin: 0 0 4px;
}

.media-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e2e8f0;
    border-top-color: #7f00ff;
    border-radius: 50%;
    margin: 0 auto 12px;
    animation: spinPlayer 0.8s linear infinite;
}

@keyframes spinPlayer {
    to { transform: rotate(360deg); }
}


/* =========================================================
   7. FRYNZY Player Modal - Google Files / Samsung Style
   ========================================================= */
.frynzy-player-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000100;
    background: #382534; /* Adaptive dynamic color fallback */
    background: linear-gradient(180deg, #442a3e 0%, #251722 100%);
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    transition: background 0.6s cubic-bezier(0.2, 0, 0, 1);
    padding-top: max(env(safe-area-inset-top, 0px), 12px);
    padding-bottom: max(env(safe-area-inset-bottom, 0px), 16px);
    box-sizing: border-box;
}

.frynzy-player-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: transparent;
    z-index: 10;
}

.frynzy-player-topbar-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.frynzy-player-icon-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.35rem;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s, transform 0.15s;
    outline: none;
}

.frynzy-player-icon-btn:active {
    transform: scale(0.9);
    opacity: 0.8;
}

/* Video Player View */
.frynzy-video-view {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000000;
}

.frynzy-video-el {
    width: 100%;
    max-height: 100%;
    outline: none;
}

.frynzy-tap-zones {
    position: absolute;
    inset: 0;
    display: flex;
    z-index: 5;
}

.frynzy-tap-left { width: 45%; height: 100%; }
.frynzy-tap-center { width: 10%; height: 100%; }
.frynzy-tap-right { width: 45%; height: 100%; }

.frynzy-seek-ripple {
    position: absolute;
    top: 50%;
    transform: translateY(-50%) scale(0.85);
    background: rgba(255, 255, 255, 0.28);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    color: #ffffff;
    font-weight: 800;
    font-size: 1.2rem;
    padding: 16px 26px;
    border-radius: 999px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    z-index: 15;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.frynzy-seek-ripple.ripple-left { left: 15%; }
.frynzy-seek-ripple.ripple-right { right: 15%; }
.frynzy-seek-ripple.active { opacity: 1; transform: translateY(-50%) scale(1.1); }

/* Audio View (Google Files / Samsung Style) */
.frynzy-audio-view {
    flex: 1;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 24px 0 24px;
    box-sizing: border-box;
    width: 100%;
}

/* Large Rounded Card with Cover Artwork Inside */
.frynzy-album-art-card {
    width: min(84vw, 56vh);
    max-width: min(82vw, 600px);
    aspect-ratio: 1 / 1;
    background: #000000;
    border-radius: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    margin: 0 auto;
    transition: transform 0.3s ease;
}

.frynzy-album-cover-img {
    width: 80%;
    height: 80%;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
}

/* Track Info - Left Aligned */
.frynzy-track-info-box {
    width: min(88vw, 620px);
    max-width: min(86vw, 650px);
    margin-top: 36px;
    margin-bottom: 6px;
    text-align: left;
    box-sizing: border-box;
}

.frynzy-track-title {
    color: #ffffff;
    font-size: 1.55rem;
    font-weight: 700;
    margin: 0 0 6px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.2px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.frynzy-track-artist {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.98rem;
    font-weight: 500;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Player Bottom Controls */
.frynzy-player-bottombar {
    padding: 0 24px 24px 24px;
    background: transparent;
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
}

.frynzy-timeline-container {
    width: 100%;
    max-width: 360px;
    margin: 0 auto 28px auto;
    display: flex;
    flex-direction: column;
}

.frynzy-player-range {
    width: 100%;
    height: 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.32);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    margin: 0;
}

.frynzy-player-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
    cursor: pointer;
}

.frynzy-time-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.frynzy-time-text {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.85rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* Controls Bar: 5 buttons (Shuffle, Prev, Big White Play, Next, Repeat) */
.frynzy-controls-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
}

.frynzy-ctrl-icon-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.45rem;
    cursor: pointer;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s, color 0.2s, opacity 0.2s;
    outline: none;
}

.frynzy-ctrl-icon-btn:active {
    transform: scale(0.88);
}

.frynzy-ctrl-icon-btn.active {
    color: #c084fc;
}

.frynzy-main-play-btn {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: #ffffff;
    color: #1e1b4b;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    cursor: pointer;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45);
    transition: transform 0.15s, background 0.15s;
    outline: none;
}

.frynzy-main-play-btn:active {
    transform: scale(0.93);
}


/* 8. Profile Screen */
.profile-screen-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 24px 16px 40px;
}

.profile-card-header {
    text-align: center;
    background: #ffffff;
    border-radius: 20px;
    padding: 28px 20px;
    border: 1.5px solid #e2e8f0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    margin-bottom: 20px;
}

.profile-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid #7f00ff;
    object-fit: cover;
    margin-bottom: 12px;
}

.profile-name-large {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 4px;
}

.profile-email-large {
    font-size: 0.88rem;
    color: #64748b;
    margin: 0 0 12px;
}

.profile-badge-app {
    display: inline-block;
    background: #f1f5f9;
    color: #64748b;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 700;
}

.profile-options-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.profile-opt-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    background: #ffffff;
    border-radius: 14px;
    border: 1.5px solid #e2e8f0;
    text-decoration: none;
    color: #0f172a;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    transition: background 0.15s;
}

.profile-opt-item:active {
    background: #f8fafc;
}

.profile-opt-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-opt-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

/* =======================================================
   4. NEW MEDIA IN-APP TOP NOTIFICATION BANNER
   ======================================================= */
@keyframes bannerSlideDown {
    from {
        opacity: 0;
        transform: translateY(-40px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes bannerSlideUp {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-40px) scale(0.96);
    }
}

.new-media-top-banner {
    position: fixed;
    top: calc(12px + var(--sat, 28px));
    left: 14px;
    right: 14px;
    max-width: 520px;
    margin: 0 auto;
    z-index: 999999;
    border-radius: 18px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35), 0 4px 12px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    touch-action: pan-y;
    will-change: transform, opacity;
    animation: bannerSlideDown 0.38s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: transform 0.15s ease, opacity 0.3s ease;
}

.new-media-top-banner.swiping {
    transition: none !important;
}

.new-media-top-banner.dismissing-left {
    transform: translateX(-120vw) !important;
    opacity: 0 !important;
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease !important;
}

.new-media-top-banner.dismissing-right {
    transform: translateX(120vw) !important;
    opacity: 0 !important;
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease !important;
}

.new-media-top-banner:active:not(.swiping) {
    transform: scale(0.98);
}

.banner-left-logo {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.3);
    padding: 3px;
    object-fit: contain;
    flex-shrink: 0;
}

.banner-center-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.banner-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.banner-media-title {
    font-size: 0.9rem;
    font-weight: 800;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.banner-format-tag {
    font-size: 0.68rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
    letter-spacing: 0.4px;
    flex-shrink: 0;
}

.banner-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.74rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
}

.banner-elapsed-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.banner-thumb-frame {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    flex-shrink: 0;
    background: #0f172a;
}

.banner-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-play-hint {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 0.75rem;
}

/* =======================================================
   5. FLOATING MINI PLAYER (ROTATING DVD / VINYL DISC)
   ======================================================= */
@keyframes discSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.frynzy-mini-player {
    position: fixed;
    bottom: 68px;
    left: 12px;
    right: 12px;
    max-width: 520px;
    margin: 0 auto;
    z-index: 99998;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
    user-select: none;
    -webkit-user-select: none;
    animation: bannerSlideDown 0.3s ease forwards;
}

.mini-vinyl-wrapper {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    background: #000;
    border: 2px solid #334155;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1), 0 4px 10px rgba(0, 0, 0, 0.5);
    flex-shrink: 0;
    cursor: pointer;
}

.mini-vinyl-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.mini-vinyl-img.spinning {
    animation: discSpin 3.5s linear infinite;
}

.mini-vinyl-img.paused {
    animation-play-state: paused;
}

.mini-vinyl-center-hole {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #0f172a;
    border: 2px solid #cbd5e1;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.6);
}

.mini-info-box {
    flex: 1;
    min-width: 0;
    cursor: pointer;
}

.mini-title {
    font-size: 0.85rem;
    font-weight: 800;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-sub {
    font-size: 0.72rem;
    color: #94a3b8;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.mini-btn {
    background: none;
    border: none;
    color: #cbd5e1;
    font-size: 1.05rem;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: color 0.15s, transform 0.15s;
}

.mini-btn:active {
    transform: scale(0.9);
}

.mini-btn-play {
    color: #ffffff;
    font-size: 1.25rem;
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, #7f00ff, #ff007f);
    border-radius: 50%;
}

.mini-btn-close {
    color: #94a3b8;
    font-size: 0.88rem;
    margin-left: 2px;
}

.mini-btn-close:hover {
    color: #f43f5e;
}

/* =======================================================
   6. CAROUSEL SWIPE VIEWPORT & TRACK (RECHERCHE <-> LECTURE <-> PROFIL)
   ======================================================= */
html, body {
    height: 100% !important;
    max-height: 100% !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

.main-container {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.frynzy-tabs-swipe-viewport {
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
    position: relative !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #f2f2f7 !important;
}

body.dark-theme .frynzy-tabs-swipe-viewport {
    background: #09080e !important;
}

.frynzy-tabs-swipe-track {
    display: flex !important;
    width: 400% !important;
    height: 100% !important;
    will-change: transform !important;
    transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
    touch-action: pan-y !important;
    backface-visibility: hidden !important;
    -webkit-backface-visibility: hidden !important;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    background: #f2f2f7 !important;
}

body.dark-theme .frynzy-tabs-swipe-track {
    background: #09080e !important;
}

.frynzy-tabs-swipe-track.dragging,
.frynzy-tabs-swipe-track.no-transition {
    transition: none !important;
}

.frynzy-tabs-swipe-track > .tab-screen {
    width: 25% !important;
    height: 100% !important;
    max-height: 100% !important;
    flex-shrink: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
    overscroll-behavior-y: contain !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    box-sizing: border-box !important;
    padding: 12px 0 95px 0 !important;
    /* Contain layout/paint to this screen — prevents global relayout on scroll */
    contain: layout style !important;
    /* Prevent aggressive scroll jumps / anchoring resets when sub-views change */
    overflow-anchor: none !important;
}

.frynzy-tabs-swipe-track > .tab-screen::-webkit-scrollbar {
    display: none !important;
    width: 0px !important;
    height: 0px !important;
    background: transparent !important;
}

/* NATIVE MOBILE APP: ZERO SCROLLBARS EVERYWHERE */
* {
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
}
*::-webkit-scrollbar {
    display: none !important;
    width: 0px !important;
    height: 0px !important;
}

/* NATIVE MOBILE APP: DISABLE WEB BEHAVIORS */
html, body {
    overscroll-behavior-y: none !important;
    overscroll-behavior-x: none !important;
    overscroll-behavior: none !important;
    -webkit-user-select: none !important;
    user-select: none !important;
    -webkit-touch-callout: none !important;
    -webkit-tap-highlight-color: transparent !important;
}
input, textarea, [contenteditable="true"] {
    -webkit-user-select: text !important;
    user-select: text !important;
}


/* NATIVE MOBILE APP: 100% EDGE-TO-EDGE LAYOUT & ZERO BORDER LIMITS ON MOBILE */
@media (max-width: 768px) {
    body {
        padding: 0 !important;
        margin: 0 !important;
        overflow: hidden !important;
        height: 100% !important;
    }
    .main-container {
        width: 100% !important;
        max-width: 100% !important;
        height: calc(100vh - 62px) !important;
        height: calc(100dvh - 62px) !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }
    .frynzy-tabs-swipe-viewport {
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    .frynzy-tabs-swipe-track > .tab-screen {
        padding-left: 0 !important;
        padding-right: 0 !important;
        box-sizing: border-box !important;
    }
    .grid-container {
        width: 100% !important;
        grid-template-columns: 1fr !important;
        gap: 12px !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
        padding-bottom: 85px !important;
        box-sizing: border-box !important;
    }
    .card {
        width: 100% !important;
        border-radius: 16px !important;
        box-sizing: border-box !important;
        padding: 14px 14px !important;
    }
    #modalSearchResults {
        width: 100% !important;
        max-width: 100% !important;
        padding-bottom: 95px !important; /* Safe clearance above bottom tab bar */
        box-sizing: border-box !important;
    }
    .adult-search-item {
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 10px 12px !important;
    }
}

/* ZERO TEXT SELECTION EVERYWHERE EXCEPT FORM INPUTS */
*:not(input):not(textarea):not([contenteditable="true"]) {
    -webkit-user-select: none !important;
    user-select: none !important;
    -webkit-touch-callout: none !important;
}


/* ==========================================================================
   DOWNLOAD PROFILE & DEDICATED SCREEN (IMAGES 1 & 2 STYLE)
   ========================================================================== */
.dl-profile-section {
    margin: 10px 0 20px 0;
}

.dl-profile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.dl-profile-title {
    font-size: 1.18rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.dl-profile-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.03);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.dl-profile-card:active {
    transform: scale(0.985);
    background: #f8fafc;
}

.dl-profile-squircle {
    width: 54px;
    height: 54px;
    min-width: 54px;
    border-radius: 16px;
    background: linear-gradient(135deg, #e0f2fe 0%, #ede9fe 50%, #fce7f3 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
}

.dl-profile-squircle i {
    font-size: 1.65rem;
    color: #ef4444;
    filter: drop-shadow(0 2px 4px rgba(239, 68, 68, 0.25));
}

.dl-profile-info {
    flex: 1;
    min-width: 0;
}

.dl-profile-item-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dl-profile-item-status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
}

.dl-profile-status {
    font-size: 0.8rem;
    font-weight: 700;
    color: #ef4444; /* Default network error red or active */
}

.dl-profile-status.status-active {
    color: #10b981;
}

.dl-profile-status.status-converting {
    color: #f59e0b;
}

.dl-profile-pct {
    font-size: 0.8rem;
    font-weight: 700;
    color: #94a3b8;
}

.dl-profile-arrow {
    font-size: 1rem;
    color: #94a3b8;
    margin-left: 4px;
}

/* Dedicated Fullscreen Download Screen (Image 2) */
.dl-dedicated-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10005;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    animation: dlSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dlSlideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.dl-dedicated-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
    position: sticky;
    top: 0;
    z-index: 10;
}

.dl-dedicated-back-btn, .dl-dedicated-trash-btn {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: #0f172a;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dl-dedicated-title {
    margin: 0;
    font-size: 1.22rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.dl-dedicated-subbar {
    padding: 16px 20px 8px 20px;
}

.dl-continue-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
    cursor: pointer;
    padding: 4px 0;
}

.dl-continue-all-btn i {
    font-size: 1.3rem;
    color: #0f172a;
}

.dl-dedicated-list {
    flex: 1;
    padding: 10px 20px 90px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dl-task-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    margin-bottom: 12px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 20px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
    transition: none !important;
    animation: none !important;
    -webkit-animation: none !important;
    transform: none !important;
}

.dl-task-card.is-completed {
    cursor: pointer;
}

.dl-task-card.is-completed:active {
    transform: scale(0.985) !important;
    background: rgba(245, 245, 247, 0.98);
}

.dl-card-bg-watermark {
    position: absolute;
    right: 10px;
    bottom: -8px;
    font-size: 3.6rem;
    opacity: 0.05;
    pointer-events: none;
    z-index: 0;
    color: #1c1c1e;
}

.dl-task-thumb-wrap {
    width: 54px;
    height: 54px;
    min-width: 54px;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.07);
    background: #f1f2f6;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    flex-shrink: 0;
}

.dl-task-media-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.dl-task-thumb-badge {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.94);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.dl-completed-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #34c759;
}

.dl-task-thumb {
    width: 54px;
    height: 54px;
    min-width: 54px;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000000;
    position: relative;
    z-index: 1;
}

.dl-task-thumb.thumb-squircle {
    background: linear-gradient(135deg, #e0f2fe 0%, #ede9fe 50%, #fce7f3 100%);
}

.dl-task-thumb.thumb-squircle i {
    font-size: 1.8rem;
    color: #ef4444;
}

/* Vinyl Disc Thumbnail (Phonk/Music in Image 2) */
.dl-vinyl-disc {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: radial-gradient(circle, #2b2b2b 0%, #0d0d0d 60%, #1a1a1a 80%, #050505 100%);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 1px solid #333;
}

.dl-vinyl-center {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dl-vinyl-center img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dl-task-info {
    flex: 1;
    min-width: 0;
}

.dl-task-title {
    font-size: 0.94rem;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dl-task-prog-track {
    width: 100%;
    height: 3px;
    background: #f1f5f9;
    border-radius: 2px;
    margin: 8px 0;
    overflow: hidden;
}

.dl-task-prog-bar {
    height: 100%;
    background: #ef4444; /* Matching red progress in screenshot */
    border-radius: 2px;
    transition: width 0.25s ease;
}

.dl-task-status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dl-task-status-text {
    font-size: 0.8rem;
    font-weight: 700;
    color: #ef4444;
}

.dl-task-status-text.status-ok {
    color: #10b981;
}

.dl-task-pct {
    font-size: 0.8rem;
    font-weight: 700;
    color: #94a3b8;
}

.dl-task-action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: none;
    border: none;
    font-size: 1.3rem;
    color: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
}

.dl-task-action-btn:active {
    transform: rotate(45deg) scale(0.92);
}


/* ==========================================================================
   GOOGLE FILES STORAGE MEDIA VIEW (IMAGE 3 STYLE)
   ========================================================================== */
.gfiles-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 22px 0 12px 0;
}

.gfiles-section-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.gfiles-section-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.gfiles-hdr-btn {
    background: none;
    border: none;
    font-size: 1.15rem;
    color: #334155;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease;
}

.gfiles-hdr-btn:active {
    color: #2563eb;
}

.gfiles-search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f1f5f9;
    border-radius: 12px;
    padding: 8px 14px;
    margin-bottom: 12px;
}

.gfiles-search-bar input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 0.95rem;
    color: #0f172a;
}

.gfiles-search-close {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 0.95rem;
}

/* Horizontal Folder Chips */
.gfiles-chips-scroll {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding: 6px 4px 14px 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 14px;
}

.gfiles-chips-scroll::-webkit-scrollbar {
    display: none;
}

.gfiles-chip {
    font-size: 0.92rem;
    font-weight: 600;
    color: #64748b;
    background: none;
    border: none;
    padding: 6px 4px;
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    transition: color 0.15s ease;
}

.gfiles-chip.active {
    color: #2563eb;
    font-weight: 800;
}

.gfiles-chip.active::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 0;
    right: 0;
    height: 3px;
    background: #2563eb;
    border-radius: 2px;
}

/* Date Grouping */
.gfiles-list-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-bottom: 90px;
}

.gfiles-date-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gfiles-date-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 2px;
}

.gfiles-date-label {
    font-size: 0.96rem;
    font-weight: 700;
    color: #1e293b;
}

/* Date selection circle */
.gfiles-date-circle {
    width: 22px;
    height: 22px;
    min-width: 22px;
    border-radius: 50%;
    border: 2px solid #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    background: transparent;
    color: transparent;
}

.gfiles-date-circle.checked {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.gfiles-date-circle.checked i {
    font-size: 0.72rem;
}

/* ==========================================================================
   GOOGLE FILES MULTI-SELECTION & MEDIA ROW (IMAGES 1 & 3 STYLE)
   ========================================================================== */
.gfiles-item-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 12px;
    border-radius: 16px;
    cursor: pointer;
    transition: background 0.18s ease, transform 0.1s ease, box-shadow 0.18s ease;
    -webkit-tap-highlight-color: transparent;
    margin: 3px 6px;
    user-select: none;
    -webkit-user-select: none;
}

.gfiles-item-row:active {
    background: #f1f5f9;
}

/* Selected item encapsulation (dark blue-gray / slate, matching Images 1 & 3) */
.gfiles-item-row.selected {
    background: #47536b !important;
    border-radius: 18px !important;
    box-shadow: 0 4px 16px rgba(71, 83, 107, 0.4);
    margin: 4px 8px;
    padding: 10px 14px;
}

.gfiles-item-row.selected .gfiles-item-title {
    color: #ffffff !important;
    font-weight: 700;
}

.gfiles-item-row.selected .gfiles-item-sub {
    color: #cbd5e1 !important;
}

.gfiles-item-row.selected .gfiles-item-more {
    color: #e2e8f0 !important;
}

.gfiles-item-thumb {
    width: 52px;
    height: 52px;
    min-width: 52px;
    border-radius: 14px;
    background: #000000;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.14);
}

.gfiles-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gfiles-thumb-note {
    position: absolute;
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.92);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.7));
    pointer-events: none;
}

.gfiles-item-content {
    flex: 1;
    min-width: 0;
}

.gfiles-item-title {
    font-size: 0.94rem;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gfiles-item-sub {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gfiles-item-more {
    background: none;
    border: none;
    font-size: 1.15rem;
    color: #94a3b8;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Row selection checkmark circle */
.gfiles-row-check {
    width: 24px;
    height: 24px;
    min-width: 24px;
    border-radius: 50%;
    border: 2px solid #94a3b8;
    display: none;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: transparent;
    transition: all 0.15s ease;
    margin-left: auto;
}

.selection-mode-active .gfiles-row-check {
    display: flex;
}

.selection-mode-active .gfiles-item-more {
    display: none;
}

.gfiles-row-check.checked,
.gfiles-item-row.selected .gfiles-row-check {
    background: #2563eb !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.4);
}

.gfiles-row-check i {
    font-size: 0.72rem;
}

/* Floating Multi-Select Top Bar (Images 1 & 3) */
.gfiles-selection-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 10002;
    border-bottom: 1px solid #e2e8f0;
    animation: gfilesBarDown 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes gfilesBarDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

.gfiles-sel-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.gfiles-sel-text-group {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.gfiles-sel-count-text {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
}

.gfiles-sel-size-text {
    font-size: 0.84rem;
    font-weight: 600;
    color: #64748b;
}

.gfiles-sel-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gfiles-sel-icon-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #334155;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.15s ease;
}

.gfiles-sel-icon-btn:active {
    background: #f1f5f9;
}

/* ==========================================================================
   BOTTOM SHEETS & BACKDROP OVERLAY (IMAGE 1 & IMAGE 4)
   ========================================================================== */
.frynzy-sheet-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    z-index: 100050 !important;
    animation: fadeInBackdrop 0.2s ease forwards;
}

@keyframes fadeInBackdrop {
    from { opacity: 0; }
    to { opacity: 1; }
}

.frynzy-bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-radius: 28px 28px 0 0;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
    z-index: 100051 !important;
    max-height: 85vh;
    overflow-y: auto;
    animation: slideUpSheet 0.26s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUpSheet {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.sheet-drag-handle {
    width: 36px;
    height: 4px;
    background: #cbd5e1;
    border-radius: 2px;
    margin: 12px auto 6px;
}

/* Move to Trash Body (Image 1) */
.trash-sheet-body {
    padding: 16px 24px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.trash-animated-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    animation: trashBounce 1.5s ease-in-out infinite alternate;
}

@keyframes trashBounce {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(-4px) scale(1.04); }
}

.trash-can-graphic {
    font-size: 1.8rem;
    color: #475569;
}

.trash-sheet-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 10px 0;
}

.trash-sheet-desc {
    font-size: 0.92rem;
    color: #475569;
    line-height: 1.48;
    margin: 0 0 24px 0;
    max-width: 340px;
}

.trash-sheet-pill-btn {
    width: 100%;
    max-width: 360px;
    background: #27303f; /* Dark slate matching image 1 */
    color: #ffffff;
    border: none;
    border-radius: 999px;
    padding: 14px 24px;
    font-size: 0.98rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(39, 48, 63, 0.35);
    transition: transform 0.12s ease, background 0.15s ease;
}

.trash-sheet-pill-btn:active {
    transform: scale(0.98);
    background: #1e293b;
}

/* ==========================================================================
   DEDICATED FULLSCREEN CORBEILLE SCREEN (IMAGES 2 & 3 STYLE)
   ========================================================================== */
.trash-dedicated-screen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    width: 100% !important;
    height: 100% !important;
    background: #ffffff !important;
    z-index: 10000050 !important;
    display: flex;
    flex-direction: column;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    animation: trashSlideIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes trashSlideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

/* Hide bottom navigation, mini-player, and main header when Corbeille, Download Screen or Secure Folder is open */
body.corbeille-open #frynzyBottomNav,
body.trash-sheet-open #frynzyBottomNav,
body.secure-folder-open #frynzyBottomNav {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

body.corbeille-open #frynzyMiniPlayerOverlay,
body.corbeille-open #frynzyMiniAudioPlayer,
body.download-screen-open #frynzyMiniPlayerOverlay,
body.download-screen-open #frynzyMiniAudioPlayer,
body.secure-folder-open #frynzyMiniPlayerOverlay,
body.secure-folder-open #frynzyMiniAudioPlayer {
    display: none !important;
}

body.corbeille-open header,
body.corbeille-open .social-main-header,
body.secure-folder-open header,
body.secure-folder-open .social-main-header,
body.secure-folder-open .mobile-top-bar {
    display: none !important;
}

/* Top bar (Images 2 & 3) */
.trash-top-bar, .trash-sel-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: calc(14px + env(safe-area-inset-top, 0px)) 16px 14px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
    width: 100%;
    box-sizing: border-box;
    z-index: 20;
}

.trash-bar-left, .trash-sel-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.trash-back-icon-btn {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: #1e293b;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.trash-back-icon-btn:active {
    background: rgba(0, 0, 0, 0.06);
}

.trash-main-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.trash-sel-text-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.trash-sel-count {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.trash-sel-size {
    font-size: 0.85rem;
    font-weight: 500;
    color: #64748b;
    line-height: 1.2;
}

.trash-view-mode-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #334155;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.trash-view-mode-btn:active {
    background: rgba(0, 0, 0, 0.06);
}

/* Scrollable Container (Banner, Select All, Items) */
.trash-scrollable-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
    padding: 10px 14px calc(90px + env(safe-area-inset-bottom, 0px)) 14px;
    box-sizing: border-box;
}

/* 30-Day Info Banner (Image 2) */
.trash-info-banner {
    margin: 6px 4px 14px 4px;
    background: #eef2f6;
    border-radius: 18px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.trash-banner-content {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
}

.trash-banner-art {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 12px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.trash-banner-art i {
    color: #10b981;
    font-size: 1.35rem;
}

.trash-banner-text {
    font-size: 0.86rem;
    color: #334155;
    line-height: 1.42;
    font-weight: 500;
}

.trash-learn-more {
    color: #2563eb;
    text-decoration: underline;
    font-weight: 600;
}

.trash-banner-dismiss-btn {
    background: none;
    border: none;
    font-size: 0.95rem;
    font-weight: 800;
    color: #2563eb;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
}

/* "Tous les éléments" Row (Images 2 & 3) */
.trash-select-all-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    margin: 0 4px 6px 4px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.trash-select-all-label {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
}

/* Circular Checkbox (Images 2 & 3) */
.trash-round-checkbox {
    width: 24px;
    height: 24px;
    min-width: 24px;
    border-radius: 50%;
    border: 2px solid #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: transparent;
    transition: all 0.15s ease;
    box-sizing: border-box;
}

.trash-round-checkbox.checked {
    background: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
    color: #ffffff !important;
}

.trash-round-checkbox i {
    font-size: 0.72rem;
}

/* Trashed items container */
.trash-items-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Group header (e.g. "Il reste 24 jours") */
.trash-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px 4px 12px;
}

.trash-group-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: #0f172a;
}

/* Trashed item row */
.trash-item-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.18s ease, transform 0.1s ease;
    margin: 3px 2px;
    -webkit-tap-highlight-color: transparent;
    background: transparent;
}

.trash-item-row.selected {
    background: #eff6ff !important;
    border: 1.5px solid #3b82f6 !important;
    border-radius: 20px !important;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.18) !important;
    margin: 4px 2px;
    padding: 10px 14px;
}

.trash-item-row.selected .trash-item-title {
    color: #1d4ed8 !important;
    font-weight: 700;
}

.trash-item-row.selected .trash-item-sub {
    color: #2563eb !important;
}

.trash-item-thumb {
    width: 54px;
    height: 54px;
    min-width: 54px;
    border-radius: 14px;
    background: #0f172a;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.trash-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.trash-thumb-play {
    position: absolute;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0f172a;
    font-size: 0.65rem;
    padding-left: 2px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.trash-item-info {
    flex: 1;
    min-width: 0;
}

.trash-item-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trash-item-sub {
    font-size: 0.82rem;
    color: #64748b;
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Bottom Action Bar (Images 2 & 3) */
.trash-action-bottombar {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: #f2f4f8 !important;
    border-top: 1px solid #e2e8f0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 12px 18px calc(12px + env(safe-area-inset-bottom, 0px)) 18px !important;
    gap: 14px !important;
    z-index: 100020 !important;
    box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.06) !important;
    box-sizing: border-box !important;
}

.trash-btn-restore {
    flex: 1;
    height: 48px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.98rem;
    font-weight: 700;
    background: #eef2f6;
    color: #94a3b8;
    border: 1.5px solid transparent;
    cursor: default;
    transition: all 0.15s ease;
    box-sizing: border-box;
}

.trash-btn-restore.active {
    background: #dbeafe !important;
    color: #1e40af !important;
    border: 1.5px solid #3b82f6 !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2) !important;
}

.trash-btn-restore.active:active {
    background: #bfdbfe !important;
    transform: scale(0.98);
}

.trash-btn-delete {
    flex: 1;
    height: 48px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.98rem;
    font-weight: 700;
    background: #d8dce2;
    color: #94a3b8;
    border: none;
    cursor: default;
    transition: all 0.15s ease;
    box-sizing: border-box;
}

.trash-btn-delete.active {
    background: #1e3a8a !important; /* Solid dark navy blue like in user photo Image 3 */
    color: #ffffff !important;
    border: none !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    box-shadow: 0 4px 14px rgba(30, 58, 138, 0.35) !important;
}

.trash-btn-delete.active:active {
    background: #172554;
    transform: scale(0.98);
}

/* Restore Bottom Sheet Body (Image 4) */
.trash-restore-sheet-body {
    padding: 18px 24px 34px;
    text-align: left;
}

.trash-restore-prompt {
    font-size: 0.96rem;
    color: #1e293b;
    line-height: 1.5;
    margin: 0 0 22px 0;
    font-weight: 500;
}

.trash-restore-pill-btn {
    width: 100%;
    background: #eef2f6;
    color: #1e293b;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    padding: 14px 20px;
    font-size: 0.98rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.trash-restore-pill-btn:active {
    background: #e2e8f0;
}

/* ==========================================================================
   PERMANENT DELETE MODAL DIALOG (IMAGE 5 STYLE)
   ========================================================================== */
.frynzy-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    z-index: 100060 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeInBackdrop 0.2s ease forwards;
}

.trash-delete-dialog {
    background: #ffffff;
    width: 100%;
    max-width: 380px;
    border-radius: 28px;
    padding: 28px 24px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    z-index: 100061 !important;
    animation: popDialog 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes popDialog {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

.trash-coral-sunburst {
    width: 80px;
    height: 80px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sunburst-svg {
    width: 100%;
    height: 100%;
}

.trash-dialog-heading {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 8px 0;
    line-height: 1.35;
}

.trash-dialog-desc {
    font-size: 0.92rem;
    color: #64748b;
    margin: 0 0 24px 0;
    font-weight: 500;
}

.trash-dialog-footer {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    padding-top: 4px;
}

.trash-dialog-cancel-btn {
    background: none;
    border: none;
    font-size: 0.98rem;
    font-weight: 700;
    color: #2563eb;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 8px;
}

.trash-dialog-confirm-btn {
    background: none;
    border: none;
    font-size: 0.98rem;
    font-weight: 800;
    color: #2563eb;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 8px;
}

.trash-dialog-cancel-btn:active,
.trash-dialog-confirm-btn:active {
    background: #eff6ff;
}



/* ==========================================================================
   ADVANCED FULLSCREEN DOWNLOADS, MEDIA BADGES & ADVANCED PLAYERS (IMAGES 1-5)
   ========================================================================== */

/* 1. Dedicated Fullscreen Download Screen */
.dl-dedicated-screen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: #ffffff !important;
    z-index: 100010 !important;
    display: flex;
    flex-direction: column;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    animation: dlSlideIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dlSlideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.dl-dedicated-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: calc(14px + env(safe-area-inset-top, 0px)) 16px 14px 16px;
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
    flex-shrink: 0;
    width: 100%;
    box-sizing: border-box;
    z-index: 20;
}

.dl-dedicated-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dl-dedicated-back-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #0f172a;
    cursor: pointer;
    padding: 6px 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    transition: background 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.dl-dedicated-back-btn:active {
    background: rgba(0, 0, 0, 0.06);
}

.dl-back-pill-label {
    display: inline-flex;
    align-items: center;
    font-size: 0.88rem;
    font-weight: 700;
    color: #1e293b;
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 999px;
}

.dl-dedicated-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.dl-dedicated-trash-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #64748b;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dl-dedicated-trash-btn:active {
    background: rgba(0, 0, 0, 0.06);
}

.dl-dedicated-scrollable {
    flex: 1;
    min-height: 0;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
    padding: 10px 14px calc(30px + env(safe-area-inset-bottom, 0px)) 14px;
    box-sizing: border-box;
}

/* Hide navigation, header, and floating players when download screen or corbeille is open */
body.corbeille-open #frynzyBottomNav {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

body.download-screen-open header,
body.download-screen-open .social-main-header,
body.corbeille-open header,
body.corbeille-open .social-main-header {
    display: none !important;
}

body.download-screen-open #frynzyMiniPlayerOverlay,
body.download-screen-open #frynzyMiniAudioPlayer,
body.download-screen-open #frynzyFloatingMiniPlayer,
body.corbeille-open #frynzyMiniPlayerOverlay,
body.corbeille-open #frynzyMiniAudioPlayer,
body.corbeille-open #frynzyFloatingMiniPlayer {
    display: none !important;
}

/* 2. Media List Differentiation Badges (Google Files Style) */
.gfiles-thumb-badge {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    z-index: 3;
}
.gfiles-thumb-badge.video {
    background: #2563eb;
    color: #ffffff;
}
.gfiles-thumb-badge.audio {
    background: #a855f7;
    color: #ffffff;
}
.gfiles-thumb-badge.image {
    background: #10b981;
    color: #ffffff;
}

.gfiles-thumb-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.gfiles-thumb-play-circle {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0f172a;
    font-size: 0.65rem;
    padding-left: 2px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* 3. Universal Player Modal (Images 1 - 5) */
.frynzy-player-modal {
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: #000000 !important;
    z-index: 10000975 !important;
    display: none !important;
    flex-direction: column;
    overflow: hidden !important;
    box-sizing: border-box;
}

/* Eradicate white bar glitch: hide bottom nav whenever player modal is active */
body.player-modal-open .frynzy-bottom-nav,
body.player-modal-open #frynzyBottomNav,
#frynzyPlayerModal.active ~ .frynzy-bottom-nav,
#frynzyPlayerModal.active ~ #frynzyBottomNav {
    display: none !important;
    visibility: hidden !important;
}

.frynzy-player-modal.active {
    display: flex !important;
}

/* Floating Topbar (Images 2, 3 & 5) */
.frynzy-player-topbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 70;
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* FIX: use --sat-hw (hardware-locked, never zeroed when system bars hide)
       instead of --sat (dynamic, goes to 0 when bars hide → causes layout jump) */
    padding: calc(12px + var(--sat-hw, var(--sat, 28px))) 16px 12px 16px !important;
    background: linear-gradient(180deg, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.55) 65%, transparent 100%);
    transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-sizing: border-box;
    will-change: transform, opacity;
}

.frynzy-player-icon-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.25rem;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.frynzy-player-icon-btn:active {
    background: rgba(255, 255, 255, 0.2);
}

.frynzy-player-topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.frynzy-player-topbar-title-wrap {
    flex: 1;
    min-width: 0;
    margin: 0 10px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.frynzy-player-topbar-title {
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    width: 100%;
}

/* When controls are toggled off (Immersive Polite Clean Views: identical in portrait and rotation) */
.frynzy-player-modal.controls-hidden .frynzy-player-topbar {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(-8px) !important;
    transition: opacity 0.25s cubic-bezier(0.2, 0, 0, 1), transform 0.25s cubic-bezier(0.2, 0, 0, 1) !important;
}

.frynzy-player-modal.controls-hidden .frynzy-video-bottom-overlay {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(8px) !important;
    transition: opacity 0.25s cubic-bezier(0.2, 0, 0, 1), transform 0.25s cubic-bezier(0.2, 0, 0, 1) !important;
}

/* 4. Photo Viewer (Images 1 & 2 Style - Isolated Zoom & Pan Edge-To-Edge) */
.frynzy-image-view {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: #000000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    touch-action: none !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    contain: layout paint !important;
}

.frynzy-image-viewport {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    touch-action: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

.frynzy-image-el {
    position: absolute !important;
    inset: 0 !important;
    margin: auto !important;
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    transform-origin: center center !important;
    will-change: transform !important;
    pointer-events: auto !important;
    transition: none;
    -webkit-backface-visibility: hidden !important;
    backface-visibility: hidden !important;
    user-select: none !important;
    -webkit-user-select: none !important;
}

/* Anti-flicker rotation lock CSS */
.frynzy-screen-rotating *,
.frynzy-screen-rotating #frynzyPlayerModal,
.frynzy-screen-rotating .frynzy-image-view,
.frynzy-screen-rotating .frynzy-video-view {
    transition: none !important;
    animation-play-state: paused !important;
}

.frynzy-image-el.animating {
    transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
}

.frynzy-image-adjacent-el {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transform-origin: center center;
    will-change: transform;
    pointer-events: none;
    z-index: 5;
    backface-visibility: hidden !important;
    -webkit-backface-visibility: hidden !important;
    transform: translateZ(0);
}

.frynzy-image-adjacent-el.animating {
    transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
}

/* 5. Video Player (Images 4 & 5 Style) */
.frynzy-video-view {
    position: absolute;
    inset: 0;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.frynzy-video-container {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #000000 !important;
    will-change: transform;
    z-index: 5 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

.frynzy-video-adjacent-container {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: none;
    align-items: center !important;
    justify-content: center !important;
    background: #000000 !important;
    will-change: transform;
    pointer-events: none !important;
    z-index: 5 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

.frynzy-video-adjacent-container.active {
    display: flex !important;
}

.frynzy-video-adjacent-poster {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
}

.frynzy-video-el {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.frynzy-video-el.animating,
.frynzy-video-adjacent-container.animating {
    transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Eradicate default Android WebKit video controls & big grey play button */
video::-webkit-media-controls,
video::-webkit-media-controls-overlay-play-button,
video::-webkit-media-controls-start-playback-button,
video::-webkit-media-controls-play-button,
video::-webkit-media-controls-enclosure,
video::-webkit-media-controls-panel {
    display: none !important;
    -webkit-appearance: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.frynzy-video-el.fit-cover {
    object-fit: cover !important;
}

/* Video Buffering / Loading Spinner */
.frynzy-video-spinner {
    position: absolute;
    inset: 0;
    z-index: 25;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.frynzy-spinner-circle {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: #ef4444;
    border-right-color: #ec4899;
    border-radius: 50%;
    animation: frynzySpin 0.8s linear infinite;
}

@keyframes frynzySpin {
    to { transform: rotate(360deg); }
}

.frynzy-video-touch-layer {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 25 !important;
    background: transparent !important;
    -webkit-tap-highlight-color: transparent !important;
    touch-action: none !important;
}

/* Video Bottom Controls Overlay (Image 5) */
.frynzy-video-bottom-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 60;
    background: linear-gradient(0deg, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.6) 60%, transparent 100%);
    /* FIX: use --sab-hw (hardware-locked, never zeroed when nav bar hides) */
    padding: 16px 20px calc(16px + var(--sab-hw, var(--sab, 48px))) 20px !important;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-sizing: border-box;
    transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
    will-change: transform, opacity;
}

.frynzy-video-timeline-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.frynzy-video-slider-wrap {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.frynzy-fit-btn {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #ffffff;
    font-size: 1.15rem;
    min-width: 44px;
    min-height: 44px;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    -webkit-tap-highlight-color: transparent;
    transition: all 0.2s ease;
    z-index: 75;
}

.frynzy-fit-btn:active {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(0.95);
}

.frynzy-player-modal.is-landscape .frynzy-video-bottom-overlay,
@media (orientation: landscape) {
    .frynzy-player-modal.mode-video .frynzy-video-bottom-overlay {
        padding-right: max(72px, calc(24px + env(safe-area-inset-right, 56px))) !important;
        padding-left: max(24px, calc(20px + env(safe-area-inset-left, 16px))) !important;
        padding-bottom: max(16px, calc(10px + env(safe-area-inset-bottom, 8px))) !important;
    }
    .frynzy-player-modal.mode-video .frynzy-player-topbar {
        padding-right: max(72px, calc(24px + env(safe-area-inset-right, 56px))) !important;
        padding-left: max(24px, calc(20px + env(safe-area-inset-left, 16px))) !important;
    }
    .frynzy-player-modal.mode-video .frynzy-fit-btn {
        margin-right: 14px !important;
    }
}

.frynzy-video-controls-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    width: 100%;
}

/* Seek 10s Circular Buttons (Image 5) */
.frynzy-seek-circle-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.35rem;
    width: 44px;
    height: 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

.frynzy-seek-circle-btn span {
    position: absolute;
    font-size: 0.6rem;
    font-weight: 800;
    font-family: sans-serif;
    color: #ffffff;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -42%);
}

.frynzy-seek-circle-btn:active {
    transform: scale(0.92);
}

/* Large Circular Play/Pause Button (Image 5) */
.frynzy-main-play-btn {
    width: 64px;
    height: 64px;
    min-width: 64px;
    border-radius: 50%;
    background: #ffffff;
    color: #0f172a;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transition: transform 0.12s ease;
    -webkit-tap-highlight-color: transparent;
}

.frynzy-main-play-btn:active {
    transform: scale(0.94);
}

/* 6. Audio Player View (Image 3 Style) */
.frynzy-audio-view {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
    justify-content: space-between;
    padding: calc(65px + env(safe-area-inset-top, 0px)) 24px calc(24px + env(safe-area-inset-bottom, 0px)) 24px;
    box-sizing: border-box;
    background: #181320;
}

.frynzy-album-art-card {
    width: min(84vw, 56vh);
    max-width: min(82vw, 600px);
    aspect-ratio: 1 / 1;
    margin: 10px auto;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
    background: #231b2e;
    display: flex;
    align-items: center;
    justify-content: center;
}

.frynzy-album-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.frynzy-track-info-box {
    text-align: left;
    margin-top: 10px;
    margin-bottom: 8px;
    width: min(88vw, 620px);
    max-width: min(86vw, 650px);
    margin-left: auto;
    margin-right: auto;
}

.frynzy-audio-bottombar {
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}


/* --- Web Permission Bottom Sheet (Image 4 & 5 Style) --- */
.web-perm-backdrop {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(15, 23, 42, 0.6) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    z-index: 100015 !important;
}

.web-perm-sheet {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: #ffffff !important;
    border-top-left-radius: 24px !important;
    border-top-right-radius: 24px !important;
    padding: 14px 20px 24px 20px !important;
    z-index: 100016 !important;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.25) !important;
    animation: slideUpPermSheet 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

@keyframes slideUpPermSheet {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.web-perm-handle {
    width: 40px !important;
    height: 4px !important;
    background: #cbd5e1 !important;
    border-radius: 4px !important;
    margin: 0 auto 16px auto !important;
}

.web-perm-header {
    margin-bottom: 16px !important;
}

.web-perm-title {
    font-size: 1.15rem !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    margin: 0 !important;
}

.web-perm-card {
    display: flex !important;
    align-items: center !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    padding: 12px 14px !important;
    margin-bottom: 12px !important;
}

.web-perm-card-icon {
    width: 36px !important;
    height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.1rem !important;
    color: #334155 !important;
    margin-right: 12px !important;
    flex-shrink: 0 !important;
}

.web-perm-card-content {
    flex: 1 !important;
    margin-right: 10px !important;
}

.web-perm-card-title {
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin-bottom: 2px !important;
}

.web-perm-card-desc {
    font-size: 0.75rem !important;
    color: #64748b !important;
    line-height: 1.25 !important;
}

.web-perm-btn-grant {
    background: #f97316 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 14px !important;
    padding: 7px 14px !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
}

.web-perm-badge-granted {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    background: #dcfce7 !important;
    color: #16a34a !important;
    border: 1px solid #86efac !important;
    border-radius: 14px !important;
    padding: 5px 10px !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    flex-shrink: 0 !important;
}

.web-perm-btn-close {
    width: 100% !important;
    background: #f1f5f9 !important;
    color: #475569 !important;
    border: none !important;
    border-radius: 16px !important;
    padding: 12px !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    margin-top: 6px !important;
}

/* ========================================================================= */
/* GOOGLE FILES MODERN SUITE (IMAGES 1, 2, 3, 4, 5 STYLES)                   */
/* ========================================================================= */

/* 1. Player 3-Dot Popup Menu - Dark Theme */
.gfiles-player-menu {
    position: absolute;
    top: 56px;
    right: 12px;
    width: 280px;
    background: #1a1a2e;
    border-radius: 18px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255,255,255,0.08);
    color: #e2e8f0;
    z-index: 100010;
    overflow: hidden;
    padding: 6px 0;
    animation: gfilesPopupIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes gfilesPopupIn {
    from { opacity: 0; transform: scale(0.92) translateY(-8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.gfiles-menu-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
}

.gfiles-menu-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #e2e8f0;
    cursor: pointer;
}

.gfiles-menu-header-icons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gfiles-menu-icon-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.05rem;
    padding: 4px 6px;
    cursor: pointer;
    border-radius: 50%;
}

.gfiles-menu-divider {
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 4px 0;
}

.gfiles-menu-item {
    padding: 13px 20px;
    font-size: 0.92rem;
    color: #e2e8f0;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.15s;
}

.gfiles-menu-item:active, .gfiles-menu-item:hover {
    background: rgba(255,255,255,0.1);
}

.gfiles-menu-subtext {
    color: #94a3b8;
    font-size: 0.88rem;
    font-weight: 400;
}

/* Google Files Dark Toast Pill (Image 3 bottom: '1 fichier déplacé') */
.gfiles-bottom-toast {
    position: absolute;
    bottom: 84px;
    left: 16px;
    right: 16px;
    background: #2b2b2b;
    color: #ffffff;
    border-radius: 10px;
    padding: 14px 18px;
    font-size: 0.92rem;
    font-weight: 500;
    z-index: 99999;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    animation: gfilesToastAnim 0.25s ease-out;
}

@keyframes gfilesToastAnim {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 2. Storage Explorer Modal (Images 4 & 5 Style) */
.gfiles-explorer-modal {
    position: fixed;
    inset: 0;
    background: #ffffff;
    z-index: 100010;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.gfiles-explorer-topbar {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
}

.gfiles-exp-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    flex: 1;
    min-width: 0 !important;
    margin-left: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gfiles-exp-icon-btn {
    background: transparent;
    border: none;
    color: #334155;
    font-size: 1.15rem;
    padding: 8px 10px;
    cursor: pointer;
    border-radius: 50%;
}

.gfiles-exp-topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gfiles-breadcrumb-bar {
    padding: 10px 18px 6px;
    background: #ffffff;
}

.gfiles-breadcrumb-text {
    color: #0b57d0;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
}

.gfiles-folders-container {
    flex: 1;
    overflow-y: auto;
    padding: 12px 14px 90px;
    -webkit-overflow-scrolling: touch;
}

/* Folder Squircle Grid & Container */
.gfiles-folders-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}
.gfiles-folders-container.grid-mode,
.gfiles-folders-container.list-mode {
    display: flex;
    flex-direction: column;
}

.gfiles-folder-card {
    background: #f1eff5;
    border-radius: 14px;
    padding: 12px 6px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: transform 0.1s, background 0.15s;
    user-select: none;
    -webkit-user-select: none;
    min-width: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    height: 108px !important;
    overflow: hidden !important;
    border: 1.5px solid transparent !important;
}

.gfiles-folder-card:active {
    background: #e5e3eb;
}

.gfiles-folder-card-icon,
.gfiles-folder-icon-wrap {
    font-size: 2.2rem;
    color: #5f6368;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gfiles-folder-card-name,
.gfiles-folder-title {
    font-size: 0.78rem !important;
    line-height: 1.25 !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    text-align: center !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 4px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    white-space: normal !important;
}

.gfiles-folder-sub {
    font-size: 0.72rem;
    color: #64748b;
    margin-top: -6px;
}

/* Folder List Mode */
.gfiles-folders-container.list-mode {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gfiles-folder-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1.5px solid transparent !important;
    cursor: pointer;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    position: relative !important;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.gfiles-folder-row:active {
    background: #edf2f7;
}

.gfiles-folder-info {
    flex: 1 !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}

.gfiles-folder-row .gfiles-folder-title {
    font-size: 0.92rem !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    text-align: left !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
    word-break: normal !important;
}

.gfiles-folder-row .gfiles-folder-sub {
    font-size: 0.74rem !important;
    color: #64748b !important;
    text-align: left !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
    min-width: 0 !important;
    display: block !important;
    margin-top: 2px !important;
}

.gfiles-folder-row-icon {
    font-size: 1.5rem;
    color: #5f6368;
    flex-shrink: 0;
}

.gfiles-folder-row-name {
    flex: 1;
    min-width: 0;
    max-width: 100%;
    font-size: 0.92rem;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gfiles-folder-row-meta {
    font-size: 0.78rem;
    color: #64748b;
    flex-shrink: 0;
}

/* Bottom Action Bar (Image 5) */
.gfiles-explorer-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 76px;
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    z-index: 100020;
    box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.04);
}

.gfiles-pill-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 24px;
    padding: 11px 22px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.1s;
}

.gfiles-pill-btn:active {
    transform: scale(0.97);
}

.gfiles-pill-btn.secondary {
    background: #ffffff;
    color: #1e293b;
    border: 1.5px solid #cbd5e1;
}

.gfiles-pill-btn.primary {
    background: #0b57d0;
    color: #ffffff;
    border: none;
    box-shadow: 0 2px 8px rgba(11, 87, 208, 0.3);
}

/* 3. Dialogs ("Nouveau dossier" & "Déplacement de fichiers") */
.gfiles-dialog-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.52);
    z-index: 100050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.gfiles-dialog-card {
    background: #edf2f9;
    border-radius: 28px;
    width: 100%;
    max-width: 330px;
    padding: 24px 22px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.24);
    animation: gfilesScaleIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes gfilesScaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.gfiles-dialog-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 18px 0;
}

.gfiles-dialog-input {
    width: 100%;
    background: #ffffff;
    border: 2px solid #0b57d0;
    border-radius: 6px;
    padding: 13px 12px;
    font-size: 0.95rem;
    color: #1e293b;
    outline: none;
    box-sizing: border-box;
}

.gfiles-dialog-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
}

.gfiles-dialog-actions.right {
    justify-content: flex-end;
}

.gfiles-dialog-btn {
    border-radius: 20px;
    padding: 10px 18px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background 0.15s;
}

.gfiles-dialog-btn.cancel {
    background: none;
    color: #0b57d0;
}

.gfiles-dialog-btn.submit.disabled {
    background: #d3d7de;
    color: #74777f;
    cursor: not-allowed;
}

.gfiles-dialog-btn.submit.active {
    background: #0b57d0;
    color: #ffffff;
    cursor: pointer;
}

/* Moving Progress Card (Image 2) */
.gfiles-dialog-card.progress-card {
    padding: 26px 24px;
}

.gfiles-progress-numbers {
    font-size: 0.9rem;
    color: #444746;
    margin-bottom: 16px;
    font-weight: 500;
}

.gfiles-progress-bar-track {
    width: 100%;
    height: 5px;
    background: #c2e7ff;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 22px;
}

.gfiles-progress-bar-fill {
    height: 100%;
    background: #0b57d0;
    border-radius: 4px;
    transition: width 0.15s ease-out;
}

/* 4. Bottom Sheets (Trier par, Stockage, Vitesse) */
.gfiles-sheet-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 100030;
    animation: gfilesFadeIn 0.2s ease-out;
}

@keyframes gfilesFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.gfiles-bottom-sheet {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-radius: 28px 28px 0 0;
    z-index: 100040;
    padding: 10px 20px 28px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.2);
    animation: gfilesSlideUp 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes gfilesSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.gfiles-sheet-handle-bar {
    display: flex;
    justify-content: center;
    padding: 8px 0 16px;
    cursor: grab;
}

.gfiles-sheet-handle {
    width: 36px;
    height: 4px;
    background: #cbd5e1;
    border-radius: 4px;
}

.gfiles-sheet-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 14px;
}

.gfiles-sort-group-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin: 14px 0 6px;
}

.gfiles-sort-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 4px;
    font-size: 0.95rem;
    color: #1e293b;
    cursor: pointer;
    font-weight: 500;
}

.gfiles-sort-row:active {
    color: #0b57d0;
}

.gfiles-sort-check {
    color: #0b57d0;
    font-size: 1rem;
}

/* Volume sheet options */
.gfiles-volume-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    border-radius: 16px;
    background: #f8fafc;
    margin-bottom: 10px;
    cursor: pointer;
    border: 1.5px solid transparent;
}

.gfiles-volume-card:active {
    border-color: #0b57d0;
    background: #eff6ff;
}

.gfiles-volume-icon {
    font-size: 1.6rem;
    color: #0b57d0;
}

.gfiles-volume-info {
    flex: 1;
}

.gfiles-volume-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
}

.gfiles-volume-avail {
    font-size: 0.8rem;
    color: #64748b;
}

/* Dropdown popups */
.gfiles-dropdown-popup {
    position: fixed;
    top: 56px;
    right: 14px;
    width: 240px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.22);
    z-index: 100045;
    padding: 6px 0;
    overflow: hidden;
}

.gfiles-dropdown-item {
    padding: 13px 18px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #1e293b;
    cursor: pointer;
}

.gfiles-dropdown-item:active {
    background: #f1f5f9;
}

/* 5. Lecture Tab Main Google Files Layout */
.gfiles-lecture-container {
    padding: 10px 0 80px !important;
}

.gfiles-main-search-wrap {
    padding: 6px 14px 14px;
}

.gfiles-main-search-box {
    background: #edf2f9;
    border-radius: 28px;
    height: 48px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.gfiles-search-icon {
    color: #5f6368;
    font-size: 1.05rem;
}

.gfiles-main-search-box input {
    border: none;
    background: transparent;
    font-size: 0.92rem;
    color: #1e293b;
    flex: 1;
    outline: none;
    font-family: inherit;
}

.gfiles-search-clear-btn {
    background: none;
    border: none;
    color: #64748b;
    font-size: 0.95rem;
    cursor: pointer;
}

/* Carousel Fichiers Récents */
.gfiles-recent-section {
    padding: 4px 0 18px;
}

.gfiles-recent-header {
    padding: 0 16px 10px;
}

.gfiles-recent-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1e293b;
}

/* ── Modern RÉCENTS Horizontal Carousel with Animated Transitions ── */
.gfiles-recent-carousel {
    display: flex !important;
    flex-direction: row !important;
    gap: 12px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory !important;
    scroll-behavior: smooth !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    padding: 4px 14px 10px 14px !important;
    margin: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.gfiles-recent-carousel::-webkit-scrollbar {
    display: none !important;
}

@keyframes frynzyRecentFrameEnter {
    0% {
        opacity: 0;
        transform: translate3d(22px, 0, 0) scale(0.94);
    }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
}

.gfiles-recent-frame {
    position: relative !important;
    flex: 0 0 calc(50% - 6px) !important;
    min-width: 152px !important;
    max-width: 180px !important;
    height: 146px !important;
    border-radius: 18px !important;
    overflow: hidden !important;
    scroll-snap-align: start !important;
    cursor: pointer !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    -webkit-tap-highlight-color: transparent !important;
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.88) 0%, rgba(15, 23, 42, 0.96) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.13) !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16), inset 0 1px 1px rgba(255, 255, 255, 0.18) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s ease !important;
    animation: frynzyRecentFrameEnter 0.35s cubic-bezier(0.16, 1, 0.3, 1) both !important;
    transform: translateZ(0) !important;
    will-change: transform, opacity !important;
}

.gfiles-recent-frame:active {
    transform: scale(0.95) translateZ(0) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
}

.gfiles-recent-frame-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

/* File extension profile container (NO PINK BACKGROUND!) */
.gfiles-recent-frame-profile {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    background: radial-gradient(circle at 50% 50%, rgba(51, 65, 85, 0.55) 0%, rgba(15, 23, 42, 0.95) 100%) !important;
}

.gfiles-recent-ext-badge-pill {
    position: absolute !important;
    top: 9px !important;
    left: 9px !important;
    font-size: 0.65rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.8px !important;
    color: #e2e8f0 !important;
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    padding: 3px 8px !important;
    border-radius: 8px !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    text-transform: uppercase !important;
    z-index: 2 !important;
}

.gfiles-recent-ext-icon-wrap {
    width: 48px !important;
    height: 48px !important;
    border-radius: 14px !important;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.45rem !important;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.15) !important;
    margin-top: 2px !important;
}

.gfiles-recent-frame-play {
    position: absolute !important;
    bottom: 38px !important;
    left: 9px !important;
    width: 26px !important;
    height: 26px !important;
    border-radius: 50% !important;
    background: rgba(0, 0, 0, 0.65) !important;
    backdrop-filter: blur(6px) !important;
    -webkit-backdrop-filter: blur(6px) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.72rem !important;
    z-index: 2 !important;
}

.gfiles-recent-frame-overlay {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    padding: 24px 10px 8px 10px !important;
    background: linear-gradient(to top, rgba(10, 15, 29, 0.95) 0%, rgba(10, 15, 29, 0.7) 60%, transparent 100%) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    gap: 1px !important;
    z-index: 3 !important;
}

.gfiles-recent-frame-name {
    color: #ffffff !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8) !important;
    line-height: 1.2 !important;
}

.gfiles-recent-frame-sub {
    color: #94a3b8 !important;
    font-size: 0.64rem !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.gfiles-recent-empty {
    width: 100% !important;
    padding: 28px 16px !important;
    text-align: center !important;
    color: #94a3b8 !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    background: rgba(30, 41, 59, 0.4) !important;
    border-radius: 14px !important;
    border: 1px dashed rgba(255, 255, 255, 0.1) !important;
}
.hero-mini-card .gfiles-hero-play { font-size: 0.85rem; }

/* Empty state */
.gfiles-recent-empty {
    padding: 24px 16px;
    color: #94a3b8;
    font-size: 0.9rem;
    text-align: center;
}

/* ── Volume / Brightness Swipe Bars ── */
.frynzy-swipe-bar-overlay {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 18px;
    width: 36px;
    height: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    z-index: 900;
    pointer-events: none;
}

.frynzy-brightness-bar {
    left: 18px;
    right: auto;
}

.frynzy-swipe-bar-track {
    width: 6px;
    height: 130px;
    background: rgba(255,255,255,0.25);
    border-radius: 3px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border: 1px solid rgba(255,255,255,0.15);
}

.frynzy-swipe-bar-fill {
    width: 100%;
    background: #3b82f6;
    border-radius: 3px;
    transition: height 0.05s linear;
    min-height: 0;
}

.frynzy-swipe-bar-icon {
    color: #fff;
    font-size: 1rem;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* Catégories Section */
.gfiles-categories-section {
    padding: 0 16px;
}

.gfiles-categories-header {
    margin-bottom: 12px;
}

.gfiles-categories-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1e293b;
}

.gfiles-categories-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gfiles-cat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #ffffff;
    border-radius: 18px;
    padding: 13px 16px;
    border: 1px solid #f1f5f9;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
    transition: background 0.15s, transform 0.1s;
}

.gfiles-cat-card:active {
    background: #f8fafc;
    transform: scale(0.99);
}

.gfiles-cat-icon-squircle {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.gfiles-cat-icon-squircle.icon-downloads { background: #e8f0fe; color: #1a73e8; }
.gfiles-cat-icon-squircle.icon-images { background: #e0f2fe; color: #0284c7; }
.gfiles-cat-icon-squircle.icon-videos { background: #ede9fe; color: #7c3aed; }
.gfiles-cat-icon-squircle.icon-audio { background: #fef3c7; color: #d97706; }
.gfiles-cat-icon-squircle.icon-docs { background: #e0e7ff; color: #4f46e5; }
.gfiles-cat-icon-squircle.icon-apps { background: #dcfce7; color: #16a34a; }

.gfiles-cat-info {
    flex: 1;
}

.gfiles-cat-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 2px;
}

.gfiles-cat-size {
    font-size: 0.78rem;
    color: #64748b;
    font-weight: 500;
}

.gfiles-cat-arrow {
    color: #94a3b8;
    font-size: 0.85rem;
}

/* 6. Category Detail Fullscreen View (Image 2 Style) */
.gfiles-cat-screen {
    position: fixed;
    inset: 0;
    background: #ffffff;
    z-index: 10000150 !important;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.gfiles-cat-topbar {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    border-bottom: 1px solid #f1f5f9;
    background: #ffffff;
}

.gfiles-cat-topbar.selection-bar {
    background: #e8f0fe;
    border-color: #d2e3fc;
}

.gfiles-cat-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    flex: 1;
    margin-left: 14px;
}

.gfiles-cat-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gfiles-cat-icon-btn {
    background: transparent;
    border: none;
    color: #334155;
    font-size: 1.15rem;
    padding: 8px 10px;
    cursor: pointer;
    border-radius: 50%;
}

.gfiles-sel-info {
    flex: 1;
    margin-left: 14px;
    display: flex;
    flex-direction: column;
}

.gfiles-sel-count {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1e293b;
}

.gfiles-sel-size {
    font-size: 0.8rem;
    color: #5f6368;
}

/* Category Media Items Container */
.gfiles-cat-media-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 14px 40px;
    -webkit-overflow-scrolling: touch;
}

.gfiles-cat-media-list.grid-mode {
    display: block;
}

/* Date Groups */
.gfiles-date-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 4px 8px;
}

.gfiles-date-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: #475569;
}

.gfiles-date-circle {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
}

.gfiles-date-circle.checked {
    background: #0b57d0;
    border-color: #0b57d0;
    color: #ffffff;
    font-size: 0.72rem;
}

.gfiles-date-grid-items {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}

.gfiles-cat-item-card {
    background: #000000;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 1 / 1;
    cursor: pointer;
}

.gfiles-cat-item-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gfiles-cat-item-size-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.55);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 6px;
}

.gfiles-cat-item-check {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gfiles-cat-item-card.selected .gfiles-cat-item-check {
    background: #0b57d0;
    border-color: #0b57d0;
    color: #ffffff;
    font-size: 0.75rem;
}

.gfiles-cat-item-card.selected {
    outline: 4px solid #a8c7fa;
    border-radius: 16px;
}

/* ZIP Profile File Card */
.gfiles-zip-card {
    background: #f1f5f9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
}

.gfiles-zip-icon {
    font-size: 2.4rem;
    color: #eab308;
}

.gfiles-zip-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: #1e293b;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90%;
}

/* 7. Applications Screen (Image 1 Style) */
.gfiles-apps-tabs {
    display: flex;
    border-bottom: 1px solid #e2e8f0;
    padding: 0 14px;
    overflow-x: auto;
    scrollbar-width: none;
}

.gfiles-apps-tab-btn {
    padding: 14px 16px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #5f6368;
    background: none;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    transition: color 0.15s;
}

.gfiles-apps-tab-btn.active {
    color: #0b57d0;
    border-bottom-color: #0b57d0;
}

.gfiles-apps-chips {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    overflow-x: auto;
    scrollbar-width: none;
}

.gfiles-app-filter-chip {
    border: 1px solid #74777f;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #1f1f1f;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    background: #ffffff;
    white-space: nowrap;
    transition: all 0.15s;
}

.gfiles-app-filter-chip.active {
    background: #e8f0fe;
    border-color: #0b57d0;
    color: #0b57d0;
}

.app-chip-badge-mb {
    background: #fed7aa;
    color: #c2410c;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 4px;
}

.gfiles-apps-list {
    flex: 1;
    overflow-y: auto;
    padding: 4px 0 40px;
    -webkit-overflow-scrolling: touch;
}

.gfiles-app-row {
    display: flex;
    align-items: center;
    padding: 12px 18px;
    gap: 16px;
    cursor: pointer;
    transition: background 0.1s;
}

.gfiles-app-row:active {
    background: #f1f5f9;
}

.gfiles-app-icon-img {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: contain;
    flex-shrink: 0;
}

.gfiles-app-details {
    flex: 1;
    min-width: 0;
}

.gfiles-app-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.gfiles-app-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gfiles-app-meta {
    font-size: 0.78rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gfiles-app-more-btn {
    background: none;
    border: none;
    color: #475569;
    font-size: 1.15rem;
    padding: 8px 10px;
    cursor: pointer;
    border-radius: 50%;
}

/* Nav Badge */
.nav-icon-badge-wrap {
    position: relative;
    display: inline-block;
}

.nav-download-badge {
    position: absolute;
    top: -6px;
    right: -10px;
    background: #ef4444;
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
}

/* ==========================================================================
 * GOOGLE FILES NATIVE UI OVERHAUL & TOP-LEVEL Z-INDEX STACK
 * ========================================================================== */

/* Top-level Z-Index hierarchy: Popups & Sheets must NEVER be behind screens */
.gfiles-cat-screen, #frynzyAppsScreen, #frynzyCategoryDetailScreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: #ffffff !important;
    z-index: 999900 !important;
    display: flex;
    flex-direction: column;
}

/* Player modal must be ABOVE all category screens and storage explorer */
.frynzy-player-modal,
#frynzyPlayerModal,
#adultPlayerModal,
#frynzyPdfViewerModal,
.frynzy-code-editor-modal,
#frynzyCodeEditorModal {
    z-index: 10003000 !important;
}

.gfiles-explorer-modal, #frynzyStorageExplorerModal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: #ffffff !important;
    opacity: 1 !important;
    z-index: 10001000 !important;
    display: none;
    flex-direction: column;
}

.gfiles-explorer-modal.active, #frynzyStorageExplorerModal.active {
    display: flex !important;
}

body.dark-theme .gfiles-explorer-modal,
body.dark-theme #frynzyStorageExplorerModal {
    background: #0b1120 !important;
    color: #f8fafc !important;
    opacity: 1 !important;
}

body.dark-theme #frynzyStorageExplorerModal .gfiles-explorer-topbar {
    background: #0f172a !important;
    border-bottom: 1px solid #1e293b !important;
    color: #f8fafc !important;
}

body.dark-theme #frynzyStorageExplorerModal .gfiles-explorer-bottom-bar {
    background: #0f172a !important;
    border-top: 1px solid #1e293b !important;
    color: #f8fafc !important;
}

body.dark-theme #frynzyStorageExplorerModal .gfiles-exp-title {
    color: #f8fafc !important;
}

body.dark-theme #frynzyStorageExplorerModal .gfiles-exp-icon-btn {
    color: #cbd5e1 !important;
}

body.dark-theme .gfiles-dialog-card {
    background: #1e293b !important;
    color: #f8fafc !important;
}
body.dark-theme .gfiles-dialog-title {
    color: #f8fafc !important;
}
body.dark-theme #gfilesFileInfoContent,
body.dark-theme #gfilesFileInfoContent *,
.dark-theme #gfilesFileInfoContent * {
    color: #f1f5f9 !important;
}
body.dark-theme #gfilesFileInfoContent strong,
body.dark-theme #gfilesFileInfoContent .gfiles-info-lbl,
.dark-theme #gfilesFileInfoContent strong {
    color: #ffffff !important;
    font-weight: 700 !important;
}
body.dark-theme #gfilesFileInfoContent .gfiles-info-path,
.dark-theme #gfilesFileInfoContent .gfiles-info-path {
    color: #94a3b8 !important;
}
body.dark-theme .gfiles-progress-numbers {
    color: #94a3b8 !important;
}

.gfiles-sheet-backdrop,
#gfilesSortSheetBackdrop,
#gfilesStorageFilterSheetBackdrop {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.45) !important;
    z-index: 10002010 !important;
}

#gfilesCatMenuBackdrop,
#gfilesCatSelMenuBackdrop,
#gfilesAppsMenuBackdrop,
#gfilesAppItemMenuBackdrop,
#frynzyVaultMenuBackdrop {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: transparent !important;
    z-index: 10001015 !important;
}

#gfilesVolumeSheetBackdrop {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.5) !important;
    z-index: 10002010 !important;
}

#gfilesVolumeSheet,
#gfilesSortSheet,
#gfilesStorageFilterSheet,
.gfiles-bottom-sheet {
    z-index: 10002020 !important;
    pointer-events: auto !important;
}

#gfilesSelectionMenuBackdrop {
    position: fixed !important;
    inset: 0 !important;
    z-index: 10001010 !important;
}

#gfilesSelectionMenu,
#gfilesNormalOptionsMenu,
.frynzy-ios-glass-menu {
    z-index: 10001020 !important;
}

#gfilesNewFolderBackdrop,
#gfilesNewFileBackdrop,
.frynzy-new-folder-backdrop,
#frynzyNewFolderBackdrop {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, 0.5) !important;
    z-index: 10002030 !important;
}

#gfilesNewFolderModal,
#frynzyNewFolderDialog {
    z-index: 10002035 !important;
}

.gfiles-dialog-backdrop,
.gfiles-dialog-backdrop.active,
#gfilesMoveProgressBackdrop,
#gfilesDeleteProgressBackdrop,
#frynzyFileInfoDialogBackdrop,
#frynzyFileInfoDialogBackdrop.active {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.55) !important;
    z-index: 10002110 !important;
}

.frynzy-ios-crystal-backdrop,
#frynzyIosCompressModal,
#frynzyPermanentDeleteModal,
#gfilesDeleteConfirmModal {
    z-index: 10001060 !important;
}

#frynzyFileInfoDialogBackdrop .gfiles-dialog-card,
body.player-modal-open .gfiles-dialog-card {
    position: relative !important;
    z-index: 10002121 !important;
}

/* Modals opened over player during media playback (Copier dans, Déplacer dans, Dossier sécurisé, etc.) */
body.player-modal-open #gfilesVolumeSheetBackdrop,
body.player-modal-open #gfilesSortSheetBackdrop,
body.player-modal-open #gfilesStorageFilterSheetBackdrop,
body.player-modal-open #gfilesCatMenuBackdrop,
body.player-modal-open #gfilesCatSelMenuBackdrop,
body.player-modal-open #gfilesAppsMenuBackdrop,
body.player-modal-open #gfilesAppItemMenuBackdrop,
body.player-modal-open .gfiles-sheet-backdrop {
    z-index: 10002010 !important;
}

body.player-modal-open #gfilesVolumeSheet,
body.player-modal-open #gfilesSortSheet,
body.player-modal-open #gfilesStorageFilterSheet,
body.player-modal-open .gfiles-bottom-sheet {
    z-index: 10002020 !important;
}

body.player-modal-open #frynzyStorageExplorerModal.active,
body.player-modal-open .gfiles-explorer-modal.active,
body.player-modal-open #frynzyFileMoverModal.active,
body.code-editor-open #frynzyStorageExplorerModal.active,
body.code-editor-open .gfiles-explorer-modal.active,
body.code-editor-open #frynzyFileMoverModal.active {
    z-index: 10001000 !important;
    opacity: 1 !important;
}

body.player-modal-open #gfilesNewFolderBackdrop,
body.player-modal-open .frynzy-new-folder-backdrop,
body.player-modal-open #frynzyNewFolderBackdrop {
    z-index: 10002030 !important;
}

body.player-modal-open #gfilesNewFolderModal,
body.player-modal-open #frynzyNewFolderDialog {
    z-index: 10002035 !important;
}

body.player-modal-open .gfiles-dialog-backdrop,
body.player-modal-open #gfilesMoveProgressBackdrop,
body.player-modal-open #gfilesDeleteProgressBackdrop {
    z-index: 10002110 !important;
}

body.player-modal-open #frynzySecureWelcomeModal,
body.player-modal-open #frynzySecureUnlockModal,
body.player-modal-open .frynzy-vault-dialog-backdrop,
body.player-modal-open .frynzy-secure-modal,
body.player-modal-open #frynzySecureFolderView,
body.player-modal-open #frynzySecureSettingsScreen {
    z-index: 10002200 !important;
}

body.player-modal-open #frynzyShareChoiceSheet,
body.player-modal-open #frynzyUniversalShareSheet,
#frynzyShareChoiceSheet,
#frynzyUniversalShareSheet,
.fyshare-choice-sheet-backdrop {
    z-index: 2147483647 !important;
    position: fixed !important;
}


.gfiles-bottom-sheet,
#gfilesVolumeSheet,
#gfilesSortSheet,
#gfilesStorageFilterSheet {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: #ffffff !important;
    border-radius: 28px 28px 0 0 !important;
    padding: 20px 20px 36px !important;
    box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.18) !important;
    z-index: 10001035 !important;
    pointer-events: auto !important;
    max-height: 80vh !important;
    overflow-y: auto !important;
}

#frynzyPickerActionBar {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: #ffffff !important;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.15) !important;
    border-top: 1px solid #e2e8f0 !important;
    padding: 12px 18px !important;
    padding-bottom: calc(14px + var(--sab, 48px)) !important;
    z-index: 10001090 !important;
    pointer-events: auto !important;
}

.gfiles-dropdown-popup,
#gfilesCatMenuPopup,
#gfilesCatSelMenuPopup,
#gfilesAppsMenuPopup,
#gfilesAppItemMenuPopup {
    position: fixed !important;
    top: 60px !important;
    right: 16px !important;
    background: #ffffff !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.22) !important;
    border: 1px solid #e2e8f0 !important;
    padding: 8px 0 !important;
    min-width: 285px !important;
    width: max-content !important;
    max-width: calc(100vw - 32px) !important;
    white-space: nowrap !important;
    z-index: 10002050 !important;
    animation: gfilesPopupIn 0.15s cubic-bezier(0.16, 1, 0.3, 1) !important;
    transform-origin: top right !important;
}

@keyframes gfilesPopupIn {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

#gfilesCatMenuPopup,
#gfilesCatSelMenuPopup {
    min-width: 285px !important;
    width: max-content !important;
    max-width: calc(100vw - 32px) !important;
    white-space: nowrap !important;
}
#gfilesCatMenuPopup .gfiles-dropdown-item,
#gfilesCatSelMenuPopup .gfiles-dropdown-item,
#gfilesCatSelMenuPopup .gfiles-menu-item {
    color: #0f172a !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 13px 20px !important;
    font-size: 0.92rem !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    cursor: pointer !important;
    user-select: none !important;
    -webkit-tap-highlight-color: transparent !important;
}
#gfilesCatMenuPopup .gfiles-dropdown-item i,
#gfilesCatSelMenuPopup .gfiles-dropdown-item i,
#gfilesCatSelMenuPopup .gfiles-menu-item i {
    color: #64748b !important;
    font-size: 1.05rem !important;
    width: 22px !important;
    text-align: center !important;
}

body.dark-theme #gfilesCatMenuPopup,
body.dark-theme #gfilesCatSelMenuPopup {
    background: #1e293b !important;
    border-color: #334155 !important;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.45) !important;
}
body.dark-theme #gfilesCatMenuPopup .gfiles-dropdown-item,
body.dark-theme #gfilesCatSelMenuPopup .gfiles-dropdown-item,
body.dark-theme #gfilesCatSelMenuPopup .gfiles-menu-item {
    color: #f8fafc !important;
}
body.dark-theme #gfilesCatMenuPopup .gfiles-dropdown-item:active,
body.dark-theme #gfilesCatSelMenuPopup .gfiles-dropdown-item:active,
body.dark-theme #gfilesCatSelMenuPopup .gfiles-menu-item:active {
    background: #334155 !important;
}

.gfiles-dialog-backdrop,
.gfiles-dialog-backdrop.active,
#gfilesMoveProgressBackdrop,
#gfilesDeleteProgressBackdrop {
    z-index: 10002110 !important;
}
#gfilesNewFolderBackdrop {
    z-index: 10001030 !important;
}

/* 1. Google Files Main Search Bar (Image 2 Pill Style) */
.gfiles-main-search-wrap {
    padding: 12px 14px 16px;
    background: transparent;
}

.gfiles-search-pill {
    background: #ffffff;
    border: 1px solid #dcdfe4;
    border-radius: 28px;
    display: flex;
    align-items: center;
    padding: 6px 14px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    gap: 12px;
}

.gfiles-search-menu-btn {
    background: none;
    border: none;
    color: #444746;
    font-size: 1.15rem;
    padding: 6px 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gfiles-search-pill input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 0.95rem;
    color: #1f1f1f;
    background: transparent;
    font-family: inherit;
}

.gfiles-search-pill input::placeholder {
    color: #74777f;
}

.gfiles-search-icon-right {
    color: #444746;
    font-size: 1.05rem;
    padding-right: 4px;
}

/* 2. Google Files Sections & Image 2 Headers */
.gfiles-section {
    margin-bottom: 22px;
}

.gfiles-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding: 0 4px;
}

.gfiles-section-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1f1f1f;
}

.gfiles-section-link {
    background: none;
    border: none;
    color: #0b57d0;
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 6px;
}

.gfiles-section-dots-btn {
    background: none;
    border: none;
    color: #5f6368;
    font-size: 1.05rem;
    padding: 4px 6px;
    cursor: pointer;
}

/* 3. Image 2 Recent Media Carousel */
.gfiles-recent-carousel {
    display: flex !important;
    gap: 12px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory !important;
    scroll-behavior: smooth !important;
    scrollbar-width: none !important;
    padding: 4px 14px 10px 14px !important;
    -webkit-overflow-scrolling: touch !important;
}

.gfiles-recent-carousel::-webkit-scrollbar {
    display: none !important;
}

.gfiles-recent-card {
    position: relative;
    width: 145px;
    height: 195px;
    flex-shrink: 0;
    border-radius: 20px;
    overflow: hidden;
    background: #1e293b;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

.gfiles-recent-card-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gfiles-recent-card-dots {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: none;
    border: none;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    cursor: pointer;
    z-index: 2;
}

.gfiles-recent-card-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: none;
    color: #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.gfiles-recent-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px 12px 10px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85) 65%);
    display: flex;
    flex-direction: column;
    gap: 2px;
    z-index: 1;
}

.gfiles-recent-card-title {
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gfiles-recent-card-tag {
    color: #cbd5e1;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

/* 4. Image 2 2-Column Grid for Catégories, Collections, Stockage total */
.gfiles-grid-2col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}

.gfiles-tile-card {
    background: #ffffff;
    border: 1px solid #eef2f6;
    border-radius: 16px;
    padding: 14px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    user-select: none;
    -webkit-user-select: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.gfiles-tile-card:active {
    background: #f1f5f9;
    transform: scale(0.98);
}

.gfiles-tile-icon {
    font-size: 1.15rem !important;
    background: #f1f5f9 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    color: #000000 !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    transition: transform 0.15s ease, background 0.2s ease !important;
}

.gfiles-tile-icon i,
.gfiles-tile-icon svg {
    color: #000000 !important;
    fill: #000000 !important;
}

.gfiles-tile-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    overflow: hidden;
}

.gfiles-tile-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: #1f1f1f;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gfiles-tile-sub {
    font-size: 0.74rem;
    color: #5f6368;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 5. Breadcrumbs in Storage Explorer */
.gfiles-breadcrumb-bar {
    background: #f8fafc;
    padding: 8px 14px;
    border-bottom: 1px solid #e2e8f0;
    overflow-x: auto;
    scrollbar-width: none;
}

.gfiles-breadcrumb-trail {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.gfiles-breadcrumb-segment {
    font-size: 0.85rem;
    font-weight: 600;
    color: #0b57d0;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.12s;
    max-width: 130px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    display: inline-block !important;
    vertical-align: middle !important;
}

.gfiles-breadcrumb-segment:active {
    background: #e0f2fe;
}

.gfiles-breadcrumb-segment.active {
    color: #1e293b;
    cursor: default;
    background: transparent;
}

.gfiles-breadcrumb-sep {
    color: #94a3b8;
    font-size: 0.75rem;
    padding: 0 2px;
}

/* 6. Applications Screen Rows Matching Image 1 */
.gfiles-app-row {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    gap: 16px;
    background: #ffffff;
    cursor: pointer;
    transition: background 0.15s;
    user-select: none;
    -webkit-user-select: none;
    border-bottom: 1px solid #f8fafc;
}

.gfiles-app-row:active {
    background: #f1f5f9;
}

.gfiles-app-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    object-fit: contain;
    flex-shrink: 0;
    background: #f8fafc;
}

.gfiles-app-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.gfiles-app-name {
    font-size: 0.94rem;
    font-weight: 600;
    color: #1f1f1f;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gfiles-app-sub {
    font-size: 0.78rem;
    color: #5f6368;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gfiles-app-badge-mb {
    background: #fed7aa;
    color: #c2410c;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 4px;
}

.gfiles-app-badge-game {
    color: #8b5cf6;
    font-size: 0.85rem;
}

.gfiles-app-more-btn {
    background: none;
    border: none;
    color: #5f6368;
    font-size: 1.1rem;
    padding: 8px 10px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gfiles-app-more-btn:active {
    background: #f1f5f9;
}

/* 7. Category Explorer Media Grid & Selection */
.gfiles-cat-media-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 14px 40px;
    -webkit-overflow-scrolling: touch;
}

.gfiles-date-group-section {
    margin-bottom: 20px;
}

.gfiles-date-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 4px;
    cursor: pointer;
    user-select: none;
}

.gfiles-date-group-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
}

.gfiles-group-checkbox {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    font-size: 0.7rem;
    transition: all 0.15s;
}

.gfiles-group-checkbox.checked {
    background: #0b57d0;
    border-color: #0b57d0;
    color: #ffffff;
}

.gfiles-group-items-grid.grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.gfiles-media-card {
    position: relative;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    aspect-ratio: 1 / 1 !important;
    height: auto !important;
    min-height: unset !important;
    max-height: unset !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    background: #f1eff5 !important;
    border: 1.5px solid transparent !important;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    min-width: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 6px 6px 6px !important;
    gap: 2px !important;
    transition: transform 0.1s, background 0.15s;
}

.gfiles-media-card:active {
    background: #e5e3eb !important;
}

.lazy-thumb {
    opacity: 1 !important;
}

.lazy-thumb.loaded {
    opacity: 1 !important;
}

.gfiles-media-card.selected {
    border: 2.5px solid #2563eb !important;
    border-color: #2563eb !important;
    outline: none !important;
    background: rgba(37, 99, 235, 0.08) !important;
    box-shadow: 0 0 0 1px #2563eb, 0 4px 14px rgba(37, 99, 235, 0.22) !important;
}

.gfiles-media-thumb-box {
    position: relative !important;
    width: 100% !important;
    flex: 1 1 0% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 0 !important;
    padding-bottom: 0 !important;
    aspect-ratio: unset !important;
    background: transparent !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 1 !important;
    border-radius: 10px !important;
}

.gfiles-media-thumb-box > img,
.gfiles-media-thumb-box > .lazy-thumb,
.gfiles-media-thumb-box > .gfiles-media-thumb {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
    border-radius: 10px !important;
    display: block !important;
    margin: 0 auto !important;
}

.gfiles-media-thumb-box > .gfiles-brand-thumb-wrap {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border-radius: 10px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    overflow: visible !important;
}

.gfiles-media-thumb-box > .gfiles-media-fallback-thumb {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    font-size: 2.2rem !important;
    margin: 0 auto !important;
}

.gfiles-media-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gfiles-media-fallback-thumb {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #94a3b8;
    background: #f1f5f9;
}

.gfiles-media-fallback-thumb.audio { color: #d97706; background: #fef3c7; }
.gfiles-media-fallback-thumb.zip { color: #eab308; background: #fef9c3; }
.gfiles-media-fallback-thumb.doc { color: #4f46e5; background: #e0e7ff; }

.gfiles-card-select-circle {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    font-size: 0.65rem;
    transition: all 0.15s;
    z-index: 3;
}

.gfiles-card-select-circle.checked {
    background: #0b57d0;
    border-color: #0b57d0;
    color: #ffffff;
}

.gfiles-media-duration-pill {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.gfiles-media-zip-pill {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: #eab308;
    color: #000000;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 6px;
}

.gfiles-media-name {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 4px !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
    color: #1e293b !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    word-break: break-all !important;
    flex-shrink: 0 !important;
    margin: 2px 0 0 0 !important;
}

.gfiles-media-size {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 4px !important;
    font-size: 0.68rem !important;
    line-height: 1.2 !important;
    color: #64748b !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    flex-shrink: 0 !important;
    margin: 1px 0 0 0 !important;
}

/* Group items list mode */
.gfiles-group-items-grid.list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gfiles-media-row {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    gap: 14px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #f1f5f9;
    cursor: pointer;
    user-select: none;
    min-width: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.gfiles-media-row.selected {
    border: 2px solid #2563eb !important;
    border-color: #2563eb !important;
    outline: none !important;
    background: rgba(37, 99, 235, 0.08) !important;
    box-shadow: 0 0 0 1px #2563eb, 0 4px 14px rgba(37, 99, 235, 0.18) !important;
}

.gfiles-row-thumb-box {
    width: 44px !important;
    height: 44px !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.gfiles-row-info {
    flex: 1;
    min-width: 0;
}

.gfiles-row-name {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    font-size: 0.88rem !important;
    font-weight: 600 !important;
    color: #1e293b;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    word-break: break-all !important;
}

.gfiles-row-sub {
    font-size: 0.74rem;
    color: #64748b;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

/* Dark mode theme contrast for media titles and cards across all phones */
body.dark-theme .gfiles-media-card,
body.dark-theme .gfiles-media-row,
body.dark-theme .gfiles-folder-card,
body.dark-theme .gfiles-folder-row {
    background: #1e293b !important;
    border-color: #334155 !important;
}

body.dark-theme .gfiles-media-name,
body.dark-theme .gfiles-row-name,
body.dark-theme .gfiles-folder-title {
    color: #f1f5f9 !important;
}

body.dark-theme .gfiles-media-size,
body.dark-theme .gfiles-row-sub,
body.dark-theme .gfiles-folder-sub {
    color: #94a3b8 !important;
}


/* Category Filter Chips */
.gfiles-chips-scroll {
    display: flex;
    gap: 8px;
    padding: 10px 14px;
    overflow-x: auto;
    scrollbar-width: none;
    background: #ffffff;
    border-bottom: 1px solid #eef2f6;
    flex-shrink: 0;
}

.gfiles-chips-scroll::-webkit-scrollbar {
    display: none;
}

.gfiles-cat-chip {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid #dcdfe4;
    background: #ffffff;
    color: #3c4043;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.15s;
}

.gfiles-cat-chip.active {
    background: #e8f0fe;
    border-color: #0b57d0;
    color: #0b57d0;
}

/* ── Safe Area Padding ── */
.lecture-screen-container,
.gfiles-cat-media-container,
.frynzy-search-results-list {
    padding-left: 12px !important;
    padding-right: 12px !important;
    box-sizing: border-box;
}

/* ── Selection Mode Circles Display ── */
.gfiles-card-select-circle,
.gfiles-group-checkbox {
    display: none !important;
}
.selection-mode-active .gfiles-card-select-circle,
.selection-mode-active .gfiles-group-checkbox {
    display: flex !important;
}

/* ── Album Art Playing Pulse ── */
.frynzy-album-art-card.playing {
    box-shadow: 0 12px 36px rgba(139, 92, 246, 0.4) !important;
    transform: scale(1.02);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* ── Fichier Search Results Modal ── */
.frynzy-search-results-modal {
    position: fixed;
    top: 64px; left: 0; width: 100vw; bottom: 65px;
    background: #ffffff;
    z-index: 999900;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    box-sizing: border-box;
}
.frynzy-search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
}
.frynzy-search-result-item:active {
    background: #f8fafc;
}
.frynzy-search-result-icon {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e2e8f0;
    color: #475569;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.frynzy-search-result-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}
.frynzy-search-result-info {
    flex: 1;
    min-width: 0;
}
.frynzy-search-result-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.frynzy-search-result-sub {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 2px;
}

/* ── Code & Text Reader / Editor Modal (Antigravity Modern IDE Dark Theme) ── */
.frynzy-code-editor-modal {
    position: fixed !important;
    inset: 0 !important;
    top: 0 !important; left: 0 !important; width: 100vw !important; height: 100vh !important;
    background: #181825 !important;
    z-index: 10001060 !important;
    display: none !important;
    flex-direction: column;
    overflow: hidden;
    color: #cdd6f4 !important;
    font-family: Consolas, Menlo, Monaco, "Courier New", monospace;
}
.frynzy-code-editor-modal.active {
    display: flex !important;
}
.frynzy-code-topbar {
    height: calc(56px + var(--sat, 28px)) !important;
    padding-top: var(--sat, 28px) !important;
    padding-left: max(10px, var(--sal, 0px)) !important;
    padding-right: max(10px, var(--sar, 0px)) !important;
    padding-bottom: 0 !important;
    background: #11111b !important;
    border-bottom: 1px solid #313244 !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    z-index: 10;
    box-sizing: border-box !important;
}
.frynzy-code-topbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
}
.frynzy-code-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #a6adc8 !important;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s ease, color 0.15s ease;
}
.frynzy-code-icon-btn:active {
    background: #313244 !important;
    color: #ffffff !important;
}
.frynzy-code-ext-badge {
    display: inline-flex;
    align-items: center;
    padding: 0;
    margin: 0;
    background: transparent;
}
.frynzy-code-filename {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.frynzy-code-topbar-right {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

/* Search Bar in Code Editor */
.frynzy-code-searchbar {
    background: #1e1e2e !important;
    border-bottom: 1px solid #313244 !important;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    animation: slideDown 0.2s ease;
}
.frynzy-code-search-input {
    flex: 1;
    border: 1px solid #45475a !important;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.85rem;
    background: #11111b !important;
    color: #cdd6f4 !important;
    outline: none;
}
.frynzy-code-search-count {
    font-size: 0.8rem;
    color: #a6adc8 !important;
    font-weight: 600;
    min-width: 60px;
    text-align: center;
}

/* ── Antigravity High-Fidelity Code Viewport Wrapper & Isolated Virtualizer ── */
.frynzy-code-viewport-wrap {
    position: relative !important;
    flex: 1 !important;
    min-height: 0 !important;
    width: 100% !important;
    display: flex !important;
    overflow: hidden !important;
    background: #181825 !important;
}

.frynzy-code-viewport {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    overflow: auto !important;
    background: #181825 !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y pan-x !important;
    contain: none !important;
    box-sizing: border-box !important;
    overflow-anchor: none !important;
    overscroll-behavior: contain !important;
    overscroll-behavior-y: contain !important;
    overscroll-behavior-x: contain !important;
}

/* Antigravity Dual Fast Scrollbars (Horizontal & Vertical) */
.frynzy-code-viewport::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
.frynzy-code-viewport::-webkit-scrollbar-track {
    background: #11111b !important;
}
.frynzy-code-viewport::-webkit-scrollbar-thumb {
    background: #45475a !important;
    border-radius: 4px;
    border: 1px solid #11111b;
}
.frynzy-code-viewport::-webkit-scrollbar-thumb:hover,
.frynzy-code-viewport::-webkit-scrollbar-thumb:active {
    background: #89b4fa !important;
}
.frynzy-code-viewport::-webkit-scrollbar-corner {
    background: #11111b !important;
}

/* Strict Scroll Content — Exactly totalLines * ROW_HEIGHT, ZERO infinite lines */
.frynzy-code-scroll-content {
    position: relative !important;
    min-width: 100% !important;
    width: max-content !important;
    box-sizing: border-box !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    touch-action: pan-y pan-x !important;
}

.frynzy-code-table {
    position: relative;
    top: 0;
    left: 0;
    min-width: 100% !important;
    width: max-content !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    will-change: transform;
    font-family: 'JetBrains Mono', Consolas, Menlo, Monaco, monospace !important;
    font-size: 13px !important;
    line-height: 24px !important;
    padding: 0 !important;
    margin: 0 !important;
    touch-action: pan-y pan-x !important;
}

.frynzy-code-row {
    display: flex !important;
    flex-direction: row !important;
    height: 24px !important;
    min-height: 24px !important;
    max-height: 24px !important;
    line-height: 24px !important;
    box-sizing: border-box !important;
    align-items: center !important;
    transition: background 0.08s ease;
    min-width: 100% !important;
    width: max-content !important;
}

.frynzy-code-row:hover,
.frynzy-code-row.active {
    background: rgba(137, 180, 250, 0.12) !important;
}

.frynzy-code-cell-num {
    flex-shrink: 0 !important;
    width: 56px !important;
    min-width: 56px !important;
    height: 24px !important;
    line-height: 24px !important;
    text-align: right !important;
    padding: 0 10px 0 6px !important;
    background: #11111b !important;
    color: #585b70 !important;
    border-right: 1px solid #313244 !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    white-space: nowrap !important;
    font-variant-numeric: tabular-nums !important;
    font-size: 12px !important;
    position: sticky !important;
    left: 0 !important;
    z-index: 10 !important;
    box-sizing: border-box !important;
    cursor: pointer !important;
}

.frynzy-code-row.active .frynzy-code-cell-num {
    color: #cdd6f4 !important;
    font-weight: 700 !important;
    background: #181825 !important;
}

.frynzy-code-cell-code {
    flex: 1 0 auto !important;
    min-width: max-content !important;
    height: 24px !important;
    line-height: 24px !important;
    padding: 0 24px 0 12px !important;
    white-space: pre !important;
    color: #cdd6f4 !important;
    box-sizing: border-box !important;
    outline: none !important;
    font-size: 13px !important;
    tab-size: 4 !important;
    overflow: visible !important;
}

/* Soft-wrap Mode (Toggled via wrap button) */
.frynzy-code-viewport.wrap-mode .frynzy-code-scroll-content {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 100% !important;
    overflow-x: hidden !important;
}
.frynzy-code-viewport.wrap-mode .frynzy-code-table {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
}
.frynzy-code-viewport.wrap-mode .frynzy-code-row {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 24px !important;
    max-height: none !important;
    align-items: flex-start !important;
}
.frynzy-code-viewport.wrap-mode .frynzy-code-cell-num {
    height: auto !important;
    min-height: 24px !important;
    align-self: stretch !important;
    position: sticky !important;
    left: 0 !important;
    z-index: 10 !important;
}
.frynzy-code-viewport.wrap-mode .frynzy-code-cell-code {
    width: calc(100% - 56px) !important;
    min-width: 0 !important;
    max-width: calc(100% - 56px) !important;
    height: auto !important;
    min-height: 24px !important;
    max-height: none !important;
    line-height: 22px !important;
    white-space: pre-wrap !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    padding: 2px 16px 2px 12px !important;
}

/* Fast Scrollbar (Minimap / Jump Handle) Pinned to Viewport Edge */
.frynzy-code-fast-scrollbar {
    position: absolute !important;
    right: 0 !important;
    top: 4px !important;
    bottom: 4px !important;
    width: 36px !important;
    z-index: 50 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    touch-action: none !important;
    pointer-events: auto !important;
}

.frynzy-code-fast-track {
    position: relative !important;
    width: 6px !important;
    height: 100% !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border-radius: 3px !important;
    cursor: pointer !important;
}

.frynzy-code-fast-thumb {
    position: absolute !important;
    left: -6px !important;
    width: 18px !important;
    height: 48px !important;
    min-height: 48px !important;
    background: #89b4fa !important;
    border-radius: 9px !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45) !important;
    cursor: grab !important;
    transition: background 0.15s ease !important;
}

.frynzy-code-fast-thumb:active {
    background: #b4befe !important;
    cursor: grabbing !important;
}

.frynzy-code-fast-tooltip {
    position: absolute !important;
    right: 32px !important;
    background: #1e1e2e !important;
    color: #cdd6f4 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    padding: 4px 10px !important;
    border-radius: 6px !important;
    border: 1px solid #45475a !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5) !important;
    white-space: nowrap !important;
    pointer-events: none !important;
    z-index: 60 !important;
}

/* Light Theme Overrides for Code Viewport */
.frynzy-code-editor-modal.theme-light .frynzy-code-viewport-wrap,
.frynzy-code-editor-modal.theme-light .frynzy-code-viewport {
    background: #f8fafc !important;
}
.frynzy-code-editor-modal.theme-light .frynzy-code-cell-num {
    background: #f1f5f9 !important;
    color: #64748b !important;
    border-right-color: #cbd5e1 !important;
}
.frynzy-code-editor-modal.theme-light .frynzy-code-cell-code {
    color: #1e293b !important;
}
.frynzy-code-editor-modal.theme-light .frynzy-code-fast-track {
    background: rgba(0, 0, 0, 0.08) !important;
}
.frynzy-code-editor-modal.theme-light .frynzy-code-fast-thumb {
    background: #3b82f6 !important;
}
.frynzy-code-editor-modal.theme-light .frynzy-code-fast-tooltip {
    background: #ffffff !important;
    color: #1e293b !important;
    border-color: #cbd5e1 !important;
}

/* ── Antigravity High-Fidelity Token Palette ── */
.code-kw { color: #cba6f7 !important; font-weight: 700; } /* Soft Purple */
.code-func { color: #89b4fa !important; font-weight: 600; } /* Sky Blue */
.code-builtin { color: #94e2d5 !important; font-weight: 600; } /* Teal */
.code-type { color: #89dceb !important; font-weight: 600; } /* Cyan */
.code-special { color: #fab387 !important; font-weight: 700; } /* Peach */
.code-str { color: #a6e3a1 !important; } /* Sage Green */
.code-comm { color: #6c7086 !important; font-style: italic; } /* Muted Slate */
.code-num { color: #fab387 !important; } /* Peach */
.code-unit { color: #f38ba8 !important; } /* Coral */
.code-tag { color: #f38ba8 !important; font-weight: 700; } /* Coral */
.code-tag-bracket { color: #89dceb !important; }
.code-doctype { color: #f9e2af !important; font-style: italic; }
.code-attr { color: #f9e2af !important; } /* Warm Gold */
.code-entity { color: #cba6f7 !important; }
.code-prop { color: #89b4fa !important; } /* Blue */
.code-selector { color: #f9e2af !important; font-weight: 600; } /* Gold */
.code-atrule { color: #cba6f7 !important; }
.code-var { color: #f9e2af !important; font-weight: 600; }
.code-json-key { color: #89dceb !important; font-weight: 700; } /* Light Cyan */
.code-op { color: #f38ba8 !important; }
.code-punct { color: #a6adc8 !important; }
.code-vcf-header { color: #f38ba8 !important; font-weight: 800; }
.code-vcf-key { color: #89b4fa !important; font-weight: 700; }
.code-vcf-param { color: #f9e2af !important; }
.code-vcf-val { color: #a6e3a1 !important; }
.code-vcf-colon { color: #6c7086 !important; }
.code-md-header { color: #89b4fa !important; font-weight: 800; }
.code-md-bold { color: #f9e2af !important; font-weight: 800; }
.code-md-italic { color: #cba6f7 !important; font-style: italic; }
.code-md-link { color: #89dceb !important; text-decoration: underline; }
.code-codeblock { background: #11111b; border: 1px solid #313244; border-radius: 6px; padding: 4px; color: #fab387; display: block; margin: 4px 0; }
.code-inlinecode { background: #313244; color: #fab387; padding: 2px 6px; border-radius: 4px; }
.code-match {
    background-color: #f59e0b !important;
    color: #11111b !important;
    font-weight: 700 !important;
    padding: 1px 4px !important;
    border-radius: 3px !important;
    box-shadow: 0 0 0 1px #d97706 !important;
    display: inline !important;
}

.code-match.active {
    background-color: #ff3b30 !important;
    color: #ffffff !important;
    font-weight: 900 !important;
    padding: 2px 6px !important;
    border-radius: 3px !important;
    outline: 2px solid #ffffff !important;
    box-shadow: 0 0 10px #ff3b30, 0 0 20px rgba(255, 59, 48, 0.9) !important;
    display: inline !important;
    z-index: 5 !important;
    animation: codeMatchPulse 1.2s infinite alternate ease-in-out !important;
}

@keyframes codeMatchPulse {
    0% { transform: scale(1); box-shadow: 0 0 8px #ff3b30; }
    100% { transform: scale(1.06); box-shadow: 0 0 16px #ff3b30, 0 0 24px rgba(255, 59, 48, 0.95); }
}

.frynzy-code-row.current-search-row {
    background: rgba(255, 59, 48, 0.18) !important;
    border-left: 3px solid #ff3b30 !important;
}

.frynzy-code-row.current-search-row .frynzy-code-cell-num {
    color: #ff3b30 !important;
    font-weight: 900 !important;
    background: #26161c !important;
}

.code-color-box {
    display: inline-block !important;
    position: relative !important;
    width: 15px !important;
    height: 15px !important;
    min-width: 15px !important;
    min-height: 15px !important;
    border-radius: 4px !important;
    border: 1.5px solid rgba(255,255,255,0.95) !important;
    margin: 0 6px 0 2px !important;
    vertical-align: -2px !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.6) !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    transition: transform 0.12s ease !important;
}

.code-color-box::before {
    content: '' !important;
    position: absolute !important;
    top: -8px !important;
    bottom: -8px !important;
    left: -8px !important;
    right: -8px !important;
    z-index: 10 !important;
    cursor: pointer !important;
}

.code-color-box:hover,
.code-color-box:active {
    transform: scale(1.15) !important;
    outline: 2px solid rgba(255, 255, 255, 0.95) !important;
    outline-offset: 1px !important;
    border-color: #ffffff !important;
}
.code-color-val {
    color: #fab387 !important;
}

/* ── Brand Badges & Thumbnail Graphics ── */
.frynzy-ext-brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 0.76rem;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    line-height: 1;
}
.frynzy-ext-brand-badge i {
    font-size: 1.05rem;
}
.frynzy-ext-badge-text {
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.gfiles-brand-thumb-wrap {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 12px !important;
    position: relative !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}
.gfiles-brand-thumb-wrap .gfiles-brand-icon {
    font-size: 2.2rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}
.gfiles-brand-thumb-wrap.small {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px !important;
    padding: 0 !important;
    margin: 0 !important;
}
.gfiles-brand-thumb-wrap.small .gfiles-brand-icon {
    font-size: 1.4rem;
}
.gfiles-brand-pill {
    position: absolute !important;
    bottom: 6px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    font-size: 0.62rem !important;
    font-weight: 800 !important;
    padding: 2px 7px !important;
    border-radius: 4px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    z-index: 2 !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.25) !important;
    white-space: nowrap !important;
}

/* 3-Dot Popup Menu in Code Editor */
.frynzy-code-menu-popup {
    position: fixed;
    top: 56px;
    right: 12px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border: 1px solid #e2e8f0;
    min-width: 190px;
    z-index: 10000300;
    display: none;
    animation: fadeIn 0.15s ease;
}
.frynzy-code-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #334155;
    font-size: 0.9rem;
    cursor: pointer;
}
.frynzy-code-menu-item:active {
    background: #f8fafc;
}
.frynzy-code-menu-item i {
    width: 20px;
    color: #64748b;
}

/* Security Alert Dialog in Code Editor */
.frynzy-security-dialog-backdrop {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.6);
    z-index: 10001050 !important;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}
.frynzy-security-dialog {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    width: 100%;
    max-width: 360px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.25);
    text-align: center;
}
.frynzy-sec-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #fee2e2;
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 16px auto;
}
.frynzy-sec-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}
.frynzy-sec-desc {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 20px;
    line-height: 1.4;
}
.frynzy-sec-btns {
    display: flex;
    gap: 10px;
}
.frynzy-sec-btn {
    flex: 1;
    padding: 10px 0;
    border-radius: 10px;
    border: none;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
}
.frynzy-sec-btn.cancel {
    background: #f1f5f9;
    color: #475569;
}
.frynzy-sec-btn.danger {
    background: #ef4444;
    color: #ffffff;
}

/* ==========================================================================
 * CYPHER 2: FAVORIS STYLES (STAR BADGES)
 * ========================================================================== */
.gfiles-media-fav-star {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    color: #f59e0b;
    z-index: 5;
    pointer-events: none;
}
.gfiles-row-fav-star {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #f59e0b;
    font-size: 0.82rem;
    margin-right: 6px;
    flex-shrink: 0;
}

/* ==========================================================================
 * CYPHER 2: DOSSIER SÉCURISÉ (SECURE VAULT) FULLSCREEN & MODALS
 * ========================================================================== */
/* Onboarding / Info Welcome Modal */
.frynzy-vault-dialog-backdrop {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    z-index: 10001200 !important;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
}
.frynzy-vault-dialog-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 28px 24px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    text-align: center;
    animation: frynzyPopIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes frynzyPopIn {
    0% { opacity: 0; transform: scale(0.92); }
    100% { opacity: 1; transform: scale(1); }
}
.frynzy-vault-3d-box {
    width: 96px;
    height: 96px;
    margin: 0 auto 20px auto;
    border-radius: 28px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    box-shadow: 0 12px 24px -6px rgba(37, 99, 235, 0.45), inset 0 2px 4px rgba(255,255,255,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.frynzy-vault-3d-box i {
    font-size: 2.8rem;
    color: #ffffff;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.25));
}
.frynzy-vault-dialog-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 12px;
}
.frynzy-vault-dialog-text {
    font-size: 0.92rem;
    color: #475569;
    line-height: 1.55;
    margin-bottom: 24px;
}
.frynzy-vault-dialog-btn {
    width: 100%;
    height: 48px;
    border-radius: 14px;
    border: none;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.1s, opacity 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.frynzy-vault-dialog-btn.primary {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 8px 16px -4px rgba(37, 99, 235, 0.4);
}
.frynzy-vault-dialog-btn.primary:active {
    transform: scale(0.98);
}
.frynzy-vault-dialog-btn.secondary {
    background: #f1f5f9;
    color: #334155;
    margin-top: 10px;
}

/* Fullscreen Settings & Key Setup (All White #ffffff Background) */
.frynzy-vault-fullscreen {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: #ffffff !important;
    z-index: 10000900 !important;
    display: none;
    flex-direction: column;
    box-sizing: border-box;
    overflow: hidden;
}
.frynzy-vault-topbar {
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    border-bottom: 1px solid #f1f5f9;
    flex-shrink: 0;
    background: #ffffff;
}
.frynzy-vault-topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
}
.frynzy-vault-back-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #0f172a;
    font-size: 1.15rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.frynzy-vault-back-btn:active {
    background: #f1f5f9;
}
.frynzy-vault-topbar-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
}
.frynzy-vault-body-scroll {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 24px 20px 40px 20px;
    box-sizing: border-box;
    background: #ffffff;
}
.frynzy-vault-hero-card {
    text-align: center;
    padding: 24px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    margin-bottom: 24px;
}
.frynzy-vault-3d-shield {
    width: 100px;
    height: 100px;
    margin: 0 auto 16px auto;
    background: radial-gradient(circle at 30% 30%, #60a5fa, #1e40af);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 2.8rem;
    box-shadow: 0 16px 32px -8px rgba(30, 64, 175, 0.4), inset 0 2px 4px rgba(255,255,255,0.6);
}
.frynzy-vault-hero-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 8px;
}
.frynzy-vault-hero-sub {
    font-size: 0.88rem;
    color: #64748b;
    line-height: 1.5;
    max-width: 320px;
    margin: 0 auto;
}

/* Sections & Setting rows */
.frynzy-vault-section-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 20px 4px 10px 4px;
}
.frynzy-vault-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.frynzy-vault-item-row:active {
    background: #f8fafc;
    border-color: #cbd5e1;
}
.frynzy-vault-row-left {
    display: flex;
    align-items: center;
    gap: 14px;
}
.frynzy-vault-row-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #eff6ff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}
.frynzy-vault-row-text {
    text-align: left;
}
.frynzy-vault-row-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 3px;
}
.frynzy-vault-row-desc {
    font-size: 0.8rem;
    color: #64748b;
}
.frynzy-vault-badge-active {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #dcfce7;
    color: #16a34a;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
}

/* PIN 4-digit input screen */
.frynzy-pin-display {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin: 32px 0;
}
.frynzy-pin-cell {
    width: 56px;
    height: 64px;
    border: 2px solid #cbd5e1;
    border-radius: 16px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 800;
    color: #0f172a;
    transition: all 0.15s ease;
}
.frynzy-pin-cell.filled {
    border-color: #2563eb;
    background: #eff6ff;
    color: #1d4ed8;
}
.frynzy-pin-cell.focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}
.frynzy-pin-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    max-width: 320px;
    margin: 0 auto;
}
.frynzy-pin-btn {
    height: 60px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.06s, transform 0.06s;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
    will-change: transform;
}
.frynzy-pin-btn:active {
    background: #e2e8f0;
    transform: scale(0.94);
}
.frynzy-pin-btn.empty {
    border: none;
    background: transparent;
    cursor: default;
}

/* 9-Dot Pattern interactive screen (Spacious, airy & precise touch target) */
.frynzy-pattern-container {
    position: relative;
    width: min(312px, 86vw);
    height: min(312px, 86vw);
    margin: 16px auto;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}
.frynzy-pattern-svg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 2;
}
.frynzy-pattern-grid {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    z-index: 3;
}
.frynzy-pattern-dot-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}
.frynzy-pattern-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #cbd5e1;
    position: relative;
    transition: transform 0.16s cubic-bezier(0.16, 1, 0.3, 1), background 0.15s ease, box-shadow 0.16s ease;
    box-shadow: 0 0 0 4px rgba(241, 245, 249, 0.9), 0 2px 6px rgba(0, 0, 0, 0.08);
}
.frynzy-pattern-dot.active {
    width: 20px;
    height: 20px;
    background: #2563eb;
    transform: scale(1.25);
    box-shadow: 0 0 0 8px rgba(37, 99, 235, 0.22), 0 0 16px rgba(37, 99, 235, 0.35);
}

/* Progress Transfer Modal (Image 12 & 13) */
.frynzy-vault-progress-backdrop {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    z-index: 10001200 !important;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
}
.frynzy-vault-progress-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 28px 22px;
    width: 100%;
    max-width: 360px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    text-align: center;
}
.frynzy-vault-progress-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
}
.frynzy-vault-progress-sub {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 18px;
}
.frynzy-vault-progress-bar-bg {
    width: 100%;
    height: 10px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 12px;
}
.frynzy-vault-progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    border-radius: 999px;
    transition: width 0.15s ease-out;
}
.frynzy-vault-progress-numbers {
    font-size: 0.88rem;
    font-weight: 700;
    color: #0f172a;
}

/* ==========================================================================
 * CYPHER 3: PLATFORM SEARCH BUTTONS & BADGES
 * ========================================================================== */
.card .btn-action,
.input-area .btn-action,
.input-area-apk .btn-action {
    display: none !important;
    background: #ffffff !important;
    color: #000000 !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
    transition: transform 0.15s, opacity 0.15s !important;
}

.card .btn-action i,
.input-area .btn-action i,
.input-area-apk .btn-action i {
    color: #000000 !important;
}

/* Dynamically visible only on active card with text typed */
.card .btn-action.frynzy-platform-search-visible,
.input-area .btn-action.frynzy-platform-search-visible,
.input-area-apk .btn-action.frynzy-platform-search-visible {
    display: flex !important;
}

/* Badges: Url, Recherche, Paroles in pure black */
.card .badge,
.card .badge-search,
.card-header .badge,
.card-header .badge-search {
    color: #000000 !important;
    font-weight: 700 !important;
}

/* Tab Content Search Header Cleanup */
#tabContentSearch > header {
    display: none !important;
}

/* Mobile Top Bar Hamburger button pure black without background or border */
#mobileTopBar {
    padding: 8px 12px !important;
    background: #ffffff !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

#mobileHamburgerBtn {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #000000 !important;
    padding: 6px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    gap: 4px !important;
    cursor: pointer !important;
}

#mobileHamburgerBtn span {
    display: block !important;
    width: 20px !important;
    height: 2.5px !important;
    background: #000000 !important;
    border-radius: 2px !important;
    transition: transform 0.2s, opacity 0.2s !important;
}

/* Hide extra mobile topbar buttons */
#mobileTopBar .lang-mobile-btn,
#mobileTopBar .batch-btn,
#mobileTopBar .queue-btn,
#mobileTopBar .arrow-btn,
#mobileTopBar .header-notif-btn,
#mobileTopBar #headerNotificationBtn,
#mobileTopBar #mobileMoreBtn {
    display: none !important;
}

/* Google Files style search capsule next to hamburger */
.gfiles-top-searchbar {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 28px;
    padding: 8px 16px;
    margin-left: 10px;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    user-select: none;
    -webkit-user-select: none;
}
.gfiles-top-searchbar:active {
    background: #e2e8f0;
}
.gfiles-top-search-text {
    font-size: 0.88rem;
    color: #475569;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gfiles-top-search-icon {
    font-size: 0.95rem;
    color: #475569;
    margin-left: 8px;
    flex-shrink: 0;
}

/* ==========================================================================
 * CYPHER 3: SIDEBAR STYLING OVERHAUL
 * ========================================================================== */
#sidebar .sidebar-header i:not(.fab),
#sidebar .storage-header i:not(.fab),
#sidebar .consumption-header i:not(.fab),
#sidebar .sidebar-section-header i:not(.fab),
#sidebar .sidebar-nav-item i:not(.fab),
#sidebar .sidebar-grid-item i:not(.fab),
#sidebar .archive-header-btn i:not(.fab) {
    color: #000000 !important;
}

/* Platform brand icons retain official brand colors */
#sidebar .fab.fa-youtube { color: #ff0000 !important; }
#sidebar .fab.fa-tiktok { color: #000000 !important; }
#sidebar .fab.fa-instagram { color: #e1306c !important; }
#sidebar .fab.fa-twitter,
#sidebar .fab.fa-x-twitter { color: #1da1f2 !important; }
#sidebar .fab.fa-facebook,
#sidebar .fab.fa-facebook-f { color: #1877f2 !important; }
#sidebar .fab.fa-pinterest,
#sidebar .fab.fa-pinterest-p { color: #bd081c !important; }
#sidebar .fab.fa-spotify { color: #1db954 !important; }
#sidebar .fab.fa-soundcloud { color: #ff5500 !important; }
#sidebar .fab.fa-google-drive { color: #34a853 !important; }

/* Titles in black */
#sidebar .sidebar-section-title-text,
#sidebar .sidebar-section-title-text span,
#sidebar .sidebar-nav-item span,
#sidebar .consumption-header span,
#sidebar .storage-header span,
#sidebar .archive-header-btn span,
#sidebar .sidebar-card-title {
    color: #000000 !important;
}

/* Descriptive texts & subtitles in gray */
#sidebar .sidebar-sub-desc,
#sidebar .drag-hint,
#sidebar .archive-toggle-hint,
#sidebar .storage-limit,
#sidebar .storage-amount,
#sidebar [data-i18n="saved"],
#sidebar [data-i18n="volume"],
#sidebar .consumption-total-month {
    color: #64748b !important;
}

/* Frynzy stats numbers and volume in black */
#sidebar #quickStatsSavings,
#sidebar #quickStatsData {
    color: #000000 !important;
}

/* Favoris épinglés 0/3 in black */
#sidebar #pinnedCounter {
    color: #000000 !important;
    background: #f1f5f9 !important;
}

/* Autres plateformes counter in black */
#sidebar #othersCounter {
    color: #000000 !important;
    background: #f1f5f9 !important;
}

#sidebar #archivedCounter {
    color: #000000 !important;
    background: #f1f5f9 !important;
}

/* Voir plus button in black */
#sidebar .voir-plus-btn,
#sidebar .voir-plus-btn i {
    color: #000000 !important;
    font-weight: 700 !important;
}

/* ==========================================================================
 * CYPHER 3: GOOGLE FILES FULLSCREEN SEARCH SCREEN & COMPONENTS (IMAGES 1, 3, 4, 5)
 * ========================================================================== */
.gfiles-search-screen {
    position: fixed;
    inset: 0;
    background: #ffffff;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* Top bar: Back, Input, Clear */
.gfiles-search-topbar {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    gap: 10px;
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
}

.gfiles-search-back-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #1e293b;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}
.gfiles-search-back-btn:active {
    background: #f1f5f9;
}

.gfiles-search-input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    background: transparent;
    position: relative;
}

.gfiles-search-input {
    width: 100%;
    border: none;
    background: transparent;
    font-size: 1.05rem;
    color: #0f172a;
    outline: none;
    font-family: inherit;
    padding: 6px 0;
}
.gfiles-search-input::placeholder {
    color: #64748b;
}

.gfiles-search-clear-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}
.gfiles-search-clear-btn:active {
    background: #f1f5f9;
}

/* Horizontal Filter Chips Row */
.gfiles-search-chips-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    border-bottom: 1px solid #f1f5f9;
}
.gfiles-search-chips-bar::-webkit-scrollbar {
    display: none;
}

.gfiles-chip-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 20px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s ease;
    user-select: none;
    -webkit-user-select: none;
}
.gfiles-chip-btn:active {
    transform: scale(0.97);
}
.gfiles-chip-btn.active {
    background: #c2e7ff !important;
    border-color: #7cacf8 !important;
    color: #001d35 !important;
}
.gfiles-chip-btn.default-selected {
    background: #e2e8f0 !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
    font-weight: 700 !important;
}
.gfiles-chip-btn i {
    font-size: 0.75rem;
    margin-left: 2px;
}

/* Search Content Area */
.gfiles-search-content {
    flex: 1;
    overflow-y: auto;
    padding: 14px 16px 80px;
    -webkit-overflow-scrolling: touch;
}

.gfiles-search-section-header {
    font-size: 0.86rem;
    font-weight: 700;
    color: #475569;
    margin: 12px 0 8px;
}

/* History rows */
.gfiles-history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 4px;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.15s;
}
.gfiles-history-item:active {
    background: #f8fafc;
}
.gfiles-history-left {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.96rem;
    color: #1e293b;
    flex: 1;
    min-width: 0;
}
.gfiles-history-icon {
    color: #64748b;
    font-size: 1.15rem;
    flex-shrink: 0;
}
.gfiles-history-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gfiles-history-delete {
    color: #64748b;
    font-size: 1.15rem;
    padding: 6px 10px;
    cursor: pointer;
    flex-shrink: 0;
}
.gfiles-history-delete:active {
    color: #ef4444;
}

/* Recent items rows (matching Images 3 & 5) */
.gfiles-recent-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid #f8fafc;
    cursor: pointer;
    transition: background 0.12s;
}
.gfiles-recent-item:active {
    background: #f8fafc;
}
.gfiles-recent-thumb-wrap {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: #f1f5f9;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gfiles-recent-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.gfiles-recent-play-badge {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.25rem;
}
.gfiles-recent-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.gfiles-recent-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gfiles-recent-sub {
    font-size: 0.78rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gfiles-recent-right-icon {
    color: #94a3b8;
    font-size: 1.05rem;
    padding: 0 4px;
    flex-shrink: 0;
}

/* Search results list container */
.gfiles-search-results-container {
    display: flex;
    flex-direction: column;
}

/* ==========================================================================
 * BOTTOM SHEETS: CATÉGORIE, TRIER PAR, STOCKAGE (IMAGES 3, 4, 5)
 * ========================================================================== */
.gfiles-bottomsheet-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 10000500 !important;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    animation: frynzyFadeIn 0.2s ease;
}

.gfiles-bottomsheet {
    background: #ffffff;
    border-radius: 24px 24px 0 0;
    padding: 12px 20px calc(32px + env(safe-area-inset-bottom, 0px));
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.15);
    animation: frynzySlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 10000501 !important;
}

.gfiles-bottomsheet-handle {
    width: 38px;
    height: 4px;
    border-radius: 2px;
    background: #cbd5e1;
    margin: 4px auto 16px;
}

.gfiles-bottomsheet-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 16px;
}

.gfiles-sheet-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 4px;
    cursor: pointer;
    border-radius: 10px;
    transition: background 0.12s;
}
.gfiles-sheet-row:active {
    background: #f8fafc;
}
.gfiles-sheet-row-left {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.98rem;
    font-weight: 500;
    color: #1e293b;
}
.gfiles-sheet-row-left i {
    font-size: 1.15rem;
    color: #334155;
    width: 24px;
    text-align: center;
}

/* Custom Checkbox */
.gfiles-checkbox {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 2px solid #0b57d0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    background: transparent;
    color: transparent;
    font-size: 0.75rem;
}
.gfiles-checkbox.checked {
    background: #0b57d0;
    color: #ffffff;
}

/* Custom Radio */
.gfiles-radio {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.15s;
}
.gfiles-radio.selected {
    border-color: #0b57d0;
}
.gfiles-radio.selected::after {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #0b57d0;
}

/* ==========================================================================
 * DATE RANGE CALENDAR PICKER MODAL (IMAGE 1)
 * ========================================================================== */
.gfiles-calendar-modal {
    position: fixed;
    inset: 0;
    background: #ffffff;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: frynzyFadeIn 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.gfiles-calendar-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: calc(14px + var(--sat, 28px)) 18px 6px;
}
.gfiles-calendar-close-btn {
    border: none;
    background: transparent;
    color: #1e293b;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 6px;
}
.gfiles-calendar-save-btn {
    border: none;
    background: transparent;
    color: #0b57d0;
    font-weight: 700;
    font-size: 0.96rem;
    cursor: pointer;
    padding: 6px 12px;
}

.gfiles-calendar-subheading {
    font-size: 0.86rem;
    color: #475569;
    padding: 0 20px;
    margin-top: 4px;
}

.gfiles-calendar-range-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 20px 14px;
    font-size: 1.45rem;
    font-weight: 700;
    color: #0f172a;
}
.gfiles-calendar-range-label i {
    font-size: 1.15rem;
    color: #475569;
}

/* Fixed Weekday Row (L M M J V S D) */
.gfiles-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 0.82rem;
    font-weight: 700;
    color: #475569;
    padding: 10px 14px;
    border-bottom: 1px solid #1e293b;
    background: #ffffff;
}

/* Scrollable Months Grid */
.gfiles-calendar-months-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 10px 14px 40px;
    -webkit-overflow-scrolling: touch;
}

.gfiles-calendar-month-block {
    margin-bottom: 24px;
}
.gfiles-calendar-month-title {
    font-size: 0.94rem;
    font-weight: 700;
    color: #1e293b;
    padding: 10px 6px 12px;
}

.gfiles-calendar-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0;
    text-align: center;
}

.gfiles-cal-day {
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    font-size: 0.92rem;
    font-weight: 500;
    color: #1e293b;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    background: transparent !important;
}
.gfiles-cal-day.empty {
    cursor: default;
}
.gfiles-cal-day.future-disabled {
    opacity: 0.25 !important;
    pointer-events: none !important;
    cursor: not-allowed !important;
    color: #94a3b8 !important;
}
.gfiles-cal-day.future-disabled span {
    color: #94a3b8 !important;
    background: transparent !important;
}

/* Base day number circular target */
.gfiles-cal-day span {
    position: relative;
    z-index: 4;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.12s, color 0.12s;
    font-size: 0.90rem;
    line-height: 1;
}

/* 1. Start date circular pin (Noir) */
.gfiles-cal-day.range-start span {
    background: #000000 !important;
    color: #ffffff !important;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

/* 2. End date circular pin (Rose) */
.gfiles-cal-day.range-end span {
    background: #ec4899 !important;
    color: #ffffff !important;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(236, 72, 153, 0.4);
}

/* 3. Unified Enclosing Range Band between Start and End */
.gfiles-cal-day.in-range::before {
    content: '';
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 0;
    right: 0;
    height: 36px;
    background: rgba(236, 72, 153, 0.16) !important;
    z-index: 1;
}

/* Round band at row edges so week breaks curve naturally */
.gfiles-cal-day.in-range:nth-child(7n+1)::before {
    border-top-left-radius: 18px;
    border-bottom-left-radius: 18px;
}
.gfiles-cal-day.in-range:nth-child(7n)::before {
    border-top-right-radius: 18px;
    border-bottom-right-radius: 18px;
}

.gfiles-cal-day.in-range span {
    color: #be185d !important;
    font-weight: 600;
    background: transparent !important;
}

/* Start day band extending ONLY to the right towards end date */
.gfiles-cal-day.range-start.has-range::after {
    content: '';
    position: absolute;
    left: 50%;
    right: 0;
    top: 4px;
    bottom: 4px;
    height: 36px;
    background: rgba(236, 72, 153, 0.16) !important;
    z-index: 1;
}
.gfiles-cal-day.range-start.has-range:nth-child(7n)::after {
    display: none;
}

/* End day band extending ONLY to the left towards start date */
.gfiles-cal-day.range-end.has-range::after {
    content: '';
    position: absolute;
    left: 0;
    right: 50%;
    top: 4px;
    bottom: 4px;
    height: 36px;
    background: rgba(236, 72, 153, 0.16) !important;
    z-index: 1;
}
.gfiles-cal-day.range-end.has-range:nth-child(7n+1)::after {
    display: none;
}

/* Same-day selection or single day: pure circular pin with no trailing band */
.gfiles-cal-day.range-start.range-end::after {
    display: none !important;
}
.gfiles-cal-day.range-start:not(.has-range)::after,
.gfiles-cal-day.range-end:not(.has-range)::after {
    display: none !important;
}


/* Current Day Outline */
.gfiles-cal-day.is-today:not(.range-start):not(.range-end) span {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #0b57d0;
    color: #0b57d0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* ==========================================================================
 * MODAL CRÉER UNE COLLECTION (IMAGE 2)
 * ========================================================================== */
.frynzy-create-coll-modal {
    background: #ffffff;
    border-radius: 24px 24px 0 0;
    padding: 20px 22px 30px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.2);
    animation: frynzySlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.frynzy-create-coll-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.frynzy-create-coll-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
}
.frynzy-create-coll-close {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #f1f5f9;
    border: none;
    color: #64748b;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.frynzy-coll-form-group {
    margin-bottom: 18px;
}
.frynzy-coll-label {
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #475569;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
    display: block;
}
.frynzy-coll-input {
    width: 100%;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 0.95rem;
    color: #0f172a;
    font-family: inherit;
    outline: none;
    box-sizing: border-box;
}
.frynzy-coll-input:focus {
    border-color: #8b5cf6;
    background: #ffffff;
}
.frynzy-coll-textarea {
    width: 100%;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 0.95rem;
    color: #0f172a;
    font-family: inherit;
    outline: none;
    min-height: 80px;
    resize: none;
    box-sizing: border-box;
}
.frynzy-coll-textarea:focus {
    border-color: #8b5cf6;
    background: #ffffff;
}

/* Swatches */
.frynzy-coll-colors-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}
.frynzy-color-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}
.frynzy-color-circle.selected {
    border-color: #0f172a;
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(0,0,0,0.18);
}
.frynzy-color-circle.custom-circle {
    background: linear-gradient(135deg, #ec4899, #000000);
}

.frynzy-coll-perso-pill {
    background: #f1f5f9;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 14px;
}

.frynzy-coll-dual-colors {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 16px;
}
.frynzy-coll-color-picker-box {
    display: flex;
    align-items: center;
    gap: 8px;
}
.frynzy-coll-color-picker-box label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
}
.frynzy-coll-color-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.frynzy-coll-color-btn input[type="color"] {
    position: absolute;
    inset: -10px;
    width: 60px;
    height: 60px;
    opacity: 0;
    cursor: pointer;
}

/* Style pills */
.frynzy-coll-style-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.frynzy-coll-style-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
    margin-right: 4px;
}
.frynzy-style-pill {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s;
}
.frynzy-style-pill.active {
    border-color: #8b5cf6;
    background: #f5f3ff;
    color: #7c3aed;
}

/* Preview Bar */
.frynzy-coll-preview-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}
.frynzy-coll-preview-chip {
    width: 68px;
    height: 36px;
    border-radius: 12px;
    flex-shrink: 0;
}
.frynzy-coll-preview-text {
    font-size: 0.82rem;
    color: #475569;
    word-break: break-all;
}

/* Public toggle */
.frynzy-coll-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
}
.frynzy-coll-toggle-info-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #0f172a;
}
.frynzy-coll-toggle-info-sub {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 2px;
}

/* Modal action buttons */
.frynzy-coll-actions {
    display: flex;
    gap: 12px;
}
.frynzy-coll-cancel-btn {
    flex: 1;
    border-radius: 12px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
}
.frynzy-coll-submit-btn {
    flex: 1;
    border-radius: 12px;
    padding: 12px;
    border: none;
    background: #7c3aed;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.3);
}




/* ── Floating Circular Audio Bubble with Continuous Rotating Neon Light ── */
.frynzy-audio-bubble {
    position: fixed;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    z-index: 10000100;
    cursor: pointer;
    touch-action: none;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    -webkit-user-select: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    bottom: 80px;
    right: 18px;
    transition: transform 0.15s ease-out;
}

.frynzy-audio-bubble.dragging {
    transition: none !important;
    transform: scale(1.1);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.7);
}

/* Continuously rotating neon light aura that shifts color dynamically */
.frynzy-bubble-neon-ring {
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #ff007a, #7928ca, #0070f3, #00dfd8, #43e97b, #fbc531, #ff007a);
    animation: bubbleNeonSpin 3s linear infinite, bubbleHueShift 6s linear infinite;
    filter: blur(1.5px);
    z-index: 1;
}

@keyframes bubbleNeonSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes bubbleHueShift {
    0% { filter: hue-rotate(0deg) blur(1.5px); }
    100% { filter: hue-rotate(360deg) blur(1.5px); }
}

.frynzy-bubble-inner {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    z-index: 2;
    background: #090d16;
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.frynzy-bubble-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.frynzy-bubble-img.spinning {
    animation: discSpin 8s linear infinite;
}

.frynzy-bubble-img.paused {
    animation-play-state: paused;
}

/* ── Drag to Dismiss Zone at the Bottom of the Screen ── */
.frynzy-audio-dismiss-zone {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000090;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.frynzy-dismiss-circle {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.25);
    border: 2px solid #ef4444;
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4);
    transition: transform 0.2s ease, background 0.2s ease;
}

.frynzy-audio-dismiss-zone.active .frynzy-dismiss-circle {
    transform: scale(1.25);
    background: #ef4444;
    color: #ffffff;
    box-shadow: 0 8px 30px rgba(239, 68, 68, 0.8);
}

.frynzy-dismiss-label {
    color: #f87171;
    font-size: 0.78rem;
    font-weight: 600;
    background: rgba(15, 23, 42, 0.85);
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ── iPhone Apple Music Style Now Playing Audio Player ── */
.frynzy-audio-backdrop {
    position: absolute;
    inset: -30px;
    background-size: cover;
    background-position: center;
    filter: blur(45px) brightness(0.42);
    opacity: 0.85;
    z-index: 1;
    transition: background-image 0.6s ease;
    pointer-events: none;
}

.frynzy-player-topbar-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.frynzy-player-top-label {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.75);
    text-transform: uppercase;
}

.frynzy-ios-album-wrapper {
    position: relative;
    z-index: 5;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: calc(52px + var(--sat, 0px));
}

.frynzy-audio-view .frynzy-album-art-card {
    width: min(84vw, 56vh);
    max-width: min(82vw, 620px);
    aspect-ratio: 1 / 1;
    border-radius: 26px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65), 0 4px 16px rgba(0, 0, 0, 0.4);
    margin: 0 auto;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
    transform: scale(0.95);
    background: #111;
}

.frynzy-audio-view .frynzy-album-art-card.playing {
    transform: scale(1.02);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.8), 0 8px 24px rgba(139, 92, 246, 0.35);
}

.frynzy-audio-view .frynzy-album-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 26px;
}

.frynzy-ios-track-info-row {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 360px;
    margin: 22px auto 0 auto;
    padding: 0 8px;
    box-sizing: border-box;
}

.frynzy-ios-heart-btn {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.35rem;
}

/* ── Samsung One UI Live Wavy Propulsion Timeline Bar ── */
.frynzy-samsung-timeline-container {
    width: 100%;
    max-width: 360px;
    margin: 0 auto 20px auto;
    display: flex;
    flex-direction: column;
}

.frynzy-samsung-wave-track {
    position: relative;
    width: 100%;
    height: 28px;
    display: flex;
    align-items: center;
}

.frynzy-samsung-rail {
    position: absolute;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.22);
}

.frynzy-samsung-wave-fill {
    position: absolute;
    left: 0;
    height: 24px;
    overflow: hidden;
    pointer-events: none;
    transition: width 0.1s linear;
}

.frynzy-samsung-wave-svg {
    width: 1000px;
    height: 24px;
    position: absolute;
    left: 0;
    top: 0;
}

.frynzy-samsung-wave-path {
    fill: none;
    stroke: #ffffff;
    stroke-width: 4px;
    stroke-linecap: round;
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.8));
    animation: wavePropulsion 1.4s linear infinite;
}

@keyframes wavePropulsion {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50px); }
}

.frynzy-audio-view.paused .frynzy-samsung-wave-path {
    animation-play-state: paused;
}

.frynzy-samsung-wave-glow-thumb {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 10px #ffffff, 0 0 20px rgba(139, 92, 246, 0.9);
}

.frynzy-samsung-slider {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
    margin: 0;
}

/* iOS Apple Music Transport Controls */
.frynzy-ios-controls-bar {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
}

.frynzy-ios-play-btn {
    width: 68px !important;
    height: 68px !important;
    background: #ffffff !important;
    color: #000000 !important;
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.3) !important;
}

.frynzy-ios-skip-btn {
    font-size: 1.6rem !important;
    color: #ffffff !important;
}

/* ── Antigravity-Grade Brand Badges & SVG Thumbnail Graphics ── */
.frynzy-code-brand-identity {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.frynzy-code-svg-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}
.frynzy-code-svg-logo svg {
    width: 22px;
    height: 22px;
    display: block;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.35));
}
.frynzy-code-ext-pill {
    font-size: 0.68rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 6px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.gfiles-brand-thumb-wrap {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px !important;
    position: relative !important;
    overflow: visible !important;
    padding: 0 !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
    background: transparent !important;
}
.gfiles-brand-svg-box {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    padding-bottom: 0 !important;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15)) !important;
}
.gfiles-brand-svg-box svg {
    width: 42px !important;
    height: 42px !important;
    max-width: 46px !important;
    max-height: 46px !important;
    display: block !important;
    margin: auto !important;
    transform: none !important;
}
.gfiles-brand-thumb-wrap.small {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px !important;
    padding: 0 !important;
    margin: 0 auto !important;
}
.gfiles-brand-thumb-wrap.small .gfiles-brand-svg-box {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: auto !important;
    padding: 0 !important;
    padding-bottom: 0 !important;
}
.gfiles-brand-thumb-wrap.small .gfiles-brand-svg-box svg {
    width: 24px !important;
    height: 24px !important;
    display: block !important;
    margin: auto !important;
}
.gfiles-media-card .gfiles-brand-pill {
    display: none !important;
}


/* =========================================================================
   FRYNZY NATIVE PDF VIEWER MODAL - PURE WHITE IPHONE / APPLE STYLE
   ========================================================================= */
.frynzy-pdf-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw; height: 100vh;
    background: #ffffff;
    z-index: 10003000 !important;
    display: flex;
    flex-direction: column;
    color: #1c1c1e;
    user-select: text;
    -webkit-user-select: text;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.frynzy-pdf-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: calc(10px + var(--sat, 28px)) 16px 12px !important;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
    gap: 10px;
    z-index: 30;
    box-sizing: border-box !important;
}

.frynzy-pdf-btn {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: #f2f2f7;
    border: 1px solid rgba(0, 0, 0, 0.06);
    color: #007aff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.92rem;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.frynzy-pdf-btn:active {
    background: #e5e5ea;
    transform: scale(0.92);
}

.frynzy-pdf-info {
    flex: 1;
    min-width: 0;
    text-align: center;
    padding: 0 6px;
}

.frynzy-pdf-title {
    font-size: 0.92rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #1c1c1e;
    letter-spacing: -0.2px;
}

.frynzy-pdf-sub {
    font-size: 0.74rem;
    font-weight: 500;
    color: #8e8e93;
    margin-top: 2px;
}

.frynzy-pdf-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.frynzy-pdf-zoom-level {
    font-size: 0.76rem;
    font-weight: 600;
    color: #007aff;
    padding: 5px 9px;
    background: rgba(0, 122, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.15s;
    user-select: none;
    -webkit-user-select: none;
}
.frynzy-pdf-zoom-level:active {
    background: rgba(0, 122, 255, 0.2);
}

.frynzy-pdf-body {
    flex: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 12px 8px 80px;
    background: #ffffff;
    touch-action: none;
    user-select: text;
    -webkit-user-select: text;
}

.frynzy-pdf-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #8e8e93;
    font-size: 0.85rem;
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 15;
}

.frynzy-pdf-spinner {
    width: 36px; height: 36px;
    border: 3px solid rgba(0, 122, 255, 0.15);
    border-top-color: #007aff;
    border-radius: 50%;
    animation: frynzySpin 0.8s linear infinite;
}

.frynzy-pdf-canvas-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    max-width: 100%;
    max-height: 100%;
    transform-origin: center center;
    will-change: transform;
    user-select: text;
    -webkit-user-select: text;
}

.frynzy-pdf-page-img {
    max-width: 95vw;
    max-height: 78vh;
    object-fit: contain;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    user-select: none;
    -webkit-user-select: none;
    pointer-events: none;
}

.frynzy-pdf-bottom-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px calc(12px + var(--sab, 36px)) !important;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-top: 0.5px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.02);
    gap: 14px;
    z-index: 30;
    box-sizing: border-box !important;
}

.frynzy-pdf-nav-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(0, 122, 255, 0.08);
    border: 1px solid rgba(0, 122, 255, 0.18);
    border-radius: 22px;
    color: #007aff;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s ease;
}
.frynzy-pdf-nav-btn:active {
    background: rgba(0, 122, 255, 0.18);
    transform: scale(0.95);
}
.frynzy-pdf-nav-btn:disabled {
    opacity: 0.35;
    pointer-events: none;
}

.frynzy-pdf-page-slider-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 0 8px;
}
.frynzy-pdf-page-slider-wrap input[type="range"] {
    width: 100%;
    accent-color: #007aff;
    height: 4px;
    border-radius: 2px;
    background: #e5e5ea;
}

/* iPhone Style PDF Text Selection Bottom Sheet */
.frynzy-pdf-text-sheet-backdrop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.35);
    z-index: 10003050 !important;
    display: none;
    align-items: flex-end;
    justify-content: center;
}
.frynzy-pdf-text-sheet-backdrop.active {
    display: flex !important;
}
.frynzy-pdf-text-sheet {
    width: 100%;
    max-width: 600px;
    max-height: 75vh;
    background: #ffffff;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    padding: 16px 18px calc(16px + var(--sab, 24px));
    box-sizing: border-box;
    animation: fcpFadeIn 0.2s ease-out;
}
.frynzy-pdf-text-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.1);
    margin-bottom: 12px;
}
.frynzy-pdf-text-sheet-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1c1c1e;
    display: flex;
    align-items: center;
    gap: 8px;
}
.frynzy-pdf-text-sheet-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.frynzy-pdf-sheet-btn {
    padding: 6px 12px;
    border-radius: 14px;
    background: rgba(0, 122, 255, 0.08);
    border: 1px solid rgba(0, 122, 255, 0.18);
    color: #007aff;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background 0.15s;
}
.frynzy-pdf-sheet-btn:active {
    background: rgba(0, 122, 255, 0.18);
}
.frynzy-pdf-text-sheet-body {
    flex: 1;
    overflow-y: auto;
    font-size: 0.94rem;
    line-height: 1.65;
    color: #1c1c1e;
    user-select: text !important;
    -webkit-user-select: text !important;
    white-space: pre-wrap;
    word-break: break-word;
    padding: 8px 4px;
}

/* =========================================================================
   FRYNZY PROFESSIONAL SETTINGS SCREEN
   ========================================================================= */
.frynzy-pro-settings-container {
    padding: 14px 16px 95px;
    max-width: 600px;
    margin: 0 auto;
}

.frynzy-pro-settings-hero {
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    border-radius: 20px;
    padding: 18px 16px;
    margin-bottom: 20px;
    box-shadow: 0 8px 24px rgba(49, 46, 129, 0.25);
    color: #ffffff;
}

.frynzy-pro-hero-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.frynzy-pro-hero-avatar {
    width: 58px; height: 58px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    object-fit: cover;
}

.frynzy-pro-hero-badge {
    position: absolute;
    bottom: -2px; right: -2px;
    width: 20px; height: 20px;
    background: #10b981;
    border-radius: 50%;
    border: 2px solid #1e1b4b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    color: #ffffff;
}

.frynzy-pro-hero-info {
    flex: 1;
    min-width: 0;
}

.frynzy-pro-hero-name {
    font-size: 1.15rem;
    font-weight: 800;
    margin: 0 0 2px;
    color: #ffffff;
}

.frynzy-pro-hero-sub {
    font-size: 0.76rem;
    color: #c7d2fe;
    margin: 0 0 6px;
}

.frynzy-pro-hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.70rem;
    font-weight: 600;
    color: #34d399;
    background: rgba(16, 185, 129, 0.16);
    padding: 2px 8px;
    border-radius: 12px;
}

.frynzy-pro-group {
    margin-bottom: 20px;
}

.frynzy-pro-group-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #64748b;
    margin: 0 0 8px 8px;
}

.frynzy-pro-card {
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.frynzy-pro-row {
    display: flex;
    align-items: center;
    padding: 13px 14px;
    gap: 12px;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.12s;
}
.frynzy-pro-row:last-child {
    border-bottom: none;
}
.frynzy-pro-row:active {
    background: #f8fafc;
}

.frynzy-pro-row-icon {
    width: 38px; height: 38px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.frynzy-pro-row-content {
    flex: 1;
    min-width: 0;
}

.frynzy-pro-row-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
}

.frynzy-pro-row-sub {
    font-size: 0.73rem;
    color: #64748b;
    margin-top: 2px;
    line-height: 1.2;
}

.frynzy-pro-row-right {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #94a3b8;
    font-size: 0.82rem;
    flex-shrink: 0;
}

.frynzy-pro-action-btn {
    padding: 6px 12px;
    border-radius: 12px;
    border: none;
    background: #4f46e5;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.1s, opacity 0.15s;
}
.frynzy-pro-action-btn:active {
    transform: scale(0.95);
    opacity: 0.85;
}
.frynzy-pro-action-btn.secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}
.frynzy-pro-action-btn.secondary:active {
    background: #e2e8f0;
}

.frynzy-pro-pill-active {
    font-size: 0.74rem;
    font-weight: 700;
    color: #059669;
    background: #ecfdf5;
    padding: 3px 8px;
    border-radius: 12px;
}

/* iPhone Frosted Glass Switch (Player & Controls) */
.frynzy-toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 30px;
    flex-shrink: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}
.frynzy-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}
.frynzy-toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: rgba(225, 228, 236, 0.72);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1.5px solid rgba(255, 255, 255, 0.75);
    border-radius: 30px;
    transition: background 0.28s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.28s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
}
body.dark-theme .frynzy-toggle-slider {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}
.frynzy-toggle-slider:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 2px;
    bottom: 1.5px;
    background-color: #ffffff;
    border-radius: 50%;
    transition: transform 0.28s cubic-bezier(0.25, 1, 0.5, 1),
                box-shadow 0.28s cubic-bezier(0.25, 1, 0.5, 1),
                width 0.18s ease;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2), 0 1px 2px rgba(0, 0, 0, 0.12);
}
.frynzy-toggle-switch input:checked + .frynzy-toggle-slider {
    background: rgba(52, 199, 89, 0.92) !important;
    border-color: rgba(255, 255, 255, 0.6) !important;
    box-shadow: 0 3px 14px rgba(52, 199, 89, 0.42), inset 0 1px 1.5px rgba(255, 255, 255, 0.5) !important;
}
body.dark-theme .frynzy-toggle-switch input:checked + .frynzy-toggle-slider {
    background: rgba(48, 209, 88, 0.9) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    box-shadow: 0 3px 16px rgba(48, 209, 88, 0.5), inset 0 1px 1.5px rgba(255, 255, 255, 0.4) !important;
}
.frynzy-toggle-switch input:checked + .frynzy-toggle-slider:before {
    transform: translateX(20px);
    box-shadow: 0 3px 9px rgba(0, 0, 0, 0.25), 0 1px 3px rgba(0, 0, 0, 0.12);
}
.frynzy-toggle-switch:active .frynzy-toggle-slider:before {
    width: 27px;
}
.frynzy-toggle-switch input:checked:active + .frynzy-toggle-slider:before {
    transform: translateX(17px);
}

/* Segmented Selector for Seek Interval — iPhone Frosted Glass */
.frynzy-pro-seg-selector {
    display: flex;
    background: rgba(235, 236, 242, 0.75);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.65);
    padding: 3px;
    border-radius: 24px;
    gap: 2px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
body.dark-theme .frynzy-pro-seg-selector {
    background: rgba(28, 28, 34, 0.75);
    border-color: rgba(255, 255, 255, 0.16);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.frynzy-seg-btn {
    border: none;
    background: transparent;
    padding: 5px 11px;
    border-radius: 20px;
    font-size: 0.74rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    outline: none;
}
body.dark-theme .frynzy-seg-btn {
    color: rgba(255, 255, 255, 0.65);
}
.frynzy-seg-btn.active {
    background: #ffffff !important;
    color: #000000 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.16), 0 1px 3px rgba(0,0,0,0.08) !important;
    font-weight: 700;
    transform: scale(1.02);
}
body.dark-theme .frynzy-seg-btn.active {
    background: #ffffff !important;
    color: #000000 !important;
    box-shadow: 0 3px 12px rgba(0,0,0,0.4) !important;
}

.frynzy-pro-about {
    text-align: center;
    padding: 16px 8px 24px;
    color: #94a3b8;
}
.frynzy-pro-about-logo {
    font-size: 1rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 2px;
    letter-spacing: 0.5px;
}
.frynzy-pro-about-text {
    font-size: 0.75rem;
    margin-bottom: 4px;
}
.frynzy-pro-about-version {
    font-size: 0.70rem;
    color: #64748b;
}


/* ==========================================================================
   SAMSUNG ONE UI / IPHONE REALISTIC FROSTED GLASS AUDIO PLAYER
   Exact replica of reference media notification card
   ========================================================================== */
.frynzy-audio-view {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: #08060f !important;
    display: none !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: calc(60px + var(--sat, 28px)) 20px calc(24px + var(--sab, 48px)) 20px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    z-index: 10 !important;
}

.frynzy-audio-backdrop {
    position: absolute !important;
    inset: -20px !important;
    background-size: cover !important;
    background-position: center !important;
    filter: blur(50px) brightness(0.22) saturate(190%) !important;
    -webkit-filter: blur(50px) brightness(0.22) saturate(190%) !important;
    transform: scale(1.1) !important;
    z-index: 1 !important;
}

/* Floating Glass Card */
.frynzy-ios-glass-card {
    position: relative !important;
    z-index: 10 !important;
    width: 100% !important;
    max-width: 440px !important;
    background: rgba(26, 14, 38, 0.76) !important;
    backdrop-filter: blur(35px) saturate(190%) !important;
    -webkit-backdrop-filter: blur(35px) saturate(190%) !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    border-radius: 28px !important;
    padding: 20px 22px 24px 22px !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65), inset 0 1px 1px rgba(255, 255, 255, 0.22) !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    user-select: none !important;
    -webkit-user-select: none !important;
}

/* Card Header: Speaker output pill + Mini album thumb / Minus button */
.frynzy-glass-header-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
}





.frynzy-glass-header-actions {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

.frynzy-glass-card-mini-thumb {
    width: 36px !important;
    height: 36px !important;
    border-radius: 9px !important;
    object-fit: cover !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3) !important;
}

.frynzy-glass-minus-btn {
    width: 34px !important;
    height: 34px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.12) !important;
    border: none !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.95rem !important;
    cursor: pointer !important;
    transition: transform 0.15s ease, background 0.15s ease !important;
}

.frynzy-glass-minus-btn:active {
    transform: scale(0.92) !important;
    background: rgba(255, 255, 255, 0.22) !important;
}

/* Track Info */
.frynzy-glass-track-info {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    text-align: left !important;
}

.frynzy-glass-track-title {
    color: #ffffff !important;
    font-size: 1.18rem !important;
    font-weight: 800 !important;
    letter-spacing: -0.3px !important;
    line-height: 1.3 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.frynzy-glass-track-artist {
    color: rgba(255, 255, 255, 0.65) !important;
    font-size: 0.92rem !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* Samsung Squiggly Wave Propulsion Timeline */
.frynzy-samsung-wave-container {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    width: 100% !important;
    padding-top: 6px !important;
}

.frynzy-wave-track-wrap {
    position: relative !important;
    width: 100% !important;
    height: 24px !important;
    display: flex !important;
    align-items: center !important;
    cursor: pointer !important;
}

.frynzy-wave-rail-bg {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    height: 4px !important;
    background: rgba(255, 255, 255, 0.2) !important;
    border-radius: 2px !important;
    z-index: 1 !important;
}

.frynzy-wave-live-svg {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 3 !important;
    pointer-events: none !important;
    overflow: visible !important;
}

.frynzy-wave-unplayed-cover {
    position: absolute !important;
    right: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    background: transparent !important;
    z-index: 4 !important;
    pointer-events: none !important;
}

.frynzy-wave-thumb-dot {
    position: absolute !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 14px !important;
    height: 14px !important;
    border-radius: 50% !important;
    background: #ffffff !important;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.9), 0 2px 4px rgba(0, 0, 0, 0.4) !important;
    z-index: 5 !important;
    pointer-events: none !important;
    transition: transform 0.05s ease !important;
}

.frynzy-wave-touch-range {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    opacity: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    cursor: pointer !important;
    z-index: 10 !important;
}

.frynzy-wave-time-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    font-size: 0.78rem !important;
    color: rgba(255, 255, 255, 0.6) !important;
    font-variant-numeric: tabular-nums !important;
    font-weight: 500 !important;
}

/* Controls Row */
.frynzy-glass-controls-row {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 36px !important;
    width: 100% !important;
    padding: 4px 0 !important;
}

.frynzy-glass-ctrl-btn {
    background: transparent !important;
    border: none !important;
    color: rgba(255, 255, 255, 0.92) !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 8px !important;
    transition: transform 0.15s ease, opacity 0.15s ease !important;
}

.frynzy-glass-ctrl-btn:active {
    transform: scale(0.88) !important;
    opacity: 0.7 !important;
}

.frynzy-glass-main-play-btn {
    background: transparent !important;
    border: none !important;
    color: #ffffff !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 8px !important;
    transition: transform 0.15s ease !important;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.4)) !important;
}

.frynzy-glass-main-play-btn:active {
    transform: scale(0.9) !important;
}

/* ==========================================================================
   VIDEO PLAYER IMMERSIVE LOCK (ZERO MOVEMENT DURING SHOW/HIDE & ROTATION)
   ========================================================================== */
html.player-modal-open,
body.player-modal-open {
    background: #000000 !important;
    background-color: #000000 !important;
    overflow: hidden !important;
}

#frynzyPlayerModal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    background: #000000 !important;
    z-index: 10000975 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 !important;
}

.frynzy-video-view,
#frynzyVideoView {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: #000000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

.frynzy-video-container,
#frynzyVideoContainer {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #000000 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.frynzy-video-el,
#frynzyVideoEl {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    background: #000000 !important;
    margin: auto !important;
    transform: translateZ(0) !important;
    -webkit-transform: translateZ(0) !important;
    will-change: transform !important;
    backface-visibility: hidden !important;
    -webkit-backface-visibility: hidden !important;
}

/* ==========================================================================
   RESILIENT TOP AND BOTTOM APP BARS (GUARANTEED VISIBILITY & HARDWARE SAFE AREA)
   ========================================================================== */
#mobileTopBar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: calc(54px + var(--sat, 28px)) !important;
    padding-top: var(--sat, 28px) !important;
    padding-left: max(12px, var(--sal, 0px)) !important;
    padding-right: max(12px, var(--sar, 0px)) !important;
    padding-bottom: 0 !important;
    background: #ffffff !important;
    border-bottom: 1px solid #f1f5f9 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05) !important;
    z-index: 2900 !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
}

body.player-modal-open #mobileTopBar,
body.download-screen-open #mobileTopBar,
body.corbeille-open #mobileTopBar {
    display: none !important;
}

#frynzyBottomNav,
.frynzy-bottom-nav {
    position: fixed !important;
    bottom: 10px !important;
    left: 12px !important;
    right: 12px !important;
    margin: 0 auto !important;
    max-width: 440px !important;
    height: 58px !important;
    min-height: 58px !important;
    background: rgba(255, 255, 255, 0.76) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.65) !important;
    border-radius: 34px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.05) !important;
    z-index: 2900 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 4px 6px !important;
    gap: 4px !important;
    box-sizing: border-box !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    transform: none !important;
    -webkit-transform: none !important;
    will-change: auto !important;
}

body.dark-theme #frynzyBottomNav,
body.dark-theme .frynzy-bottom-nav {
    background: rgba(26, 26, 32, 0.76) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    box-shadow: 0 10px 34px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.25) !important;
}

body.player-modal-open #frynzyBottomNav,
body.player-modal-open .frynzy-bottom-nav,
body.corbeille-open #frynzyBottomNav,
body.corbeille-open .frynzy-bottom-nav,
body.camera-open #frynzyBottomNav,
body.camera-open .frynzy-bottom-nav,
body.secure-folder-open #frynzyBottomNav,
body.secure-folder-open .frynzy-bottom-nav {
    display: none !important;
}

.frynzy-tab-btn {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2px !important;
    background: transparent !important;
    border: none !important;
    color: #64748b !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    padding: 5px 4px !important;
    border-radius: 26px !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    outline: none !important;
    height: 48px !important;
    max-height: 48px !important;
    box-sizing: border-box !important;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-backface-visibility: hidden !important;
    backface-visibility: hidden !important;
    transform: translateZ(0) !important;
}

.frynzy-tab-btn i {
    font-size: 17px !important;
    color: #64748b !important;
    display: inline-block !important;
    -webkit-backface-visibility: hidden !important;
    backface-visibility: hidden !important;
    transform: translateZ(0) !important;
    -webkit-transform: translateZ(0) !important;
    will-change: color !important;
    text-rendering: optimizeLegibility !important;
    -webkit-font-smoothing: antialiased !important;
}

.frynzy-tab-btn span {
    color: #64748b !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    line-height: 1.15 !important;
    letter-spacing: -0.2px !important;
}

body.dark-theme .frynzy-tab-btn,
body.dark-theme .frynzy-tab-btn i,
body.dark-theme .frynzy-tab-btn span {
    color: rgba(255, 255, 255, 0.65) !important;
}

.frynzy-tab-btn.active {
    background: transparent !important;
    color: #000000 !important;
    box-shadow: none !important;
    transform: translateZ(0) !important;
}

.frynzy-tab-btn.active i {
    color: #000000 !important;
    transform: translateZ(0) !important;
}

.frynzy-tab-btn.active span {
    color: #000000 !important;
    font-weight: 700 !important;
}

body.dark-theme .frynzy-tab-btn.active {
    background: transparent !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

body.dark-theme .frynzy-tab-btn.active i,
body.dark-theme .frynzy-tab-btn.active span {
    color: #ffffff !important;
}

.main-container {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.frynzy-tabs-swipe-track > .tab-screen {
    padding-top: calc(54px + var(--sat, 28px)) !important;
    padding-bottom: 85px !important;
    box-sizing: border-box !important;
}

.lecture-screen-container,
.gfiles-lecture-container {
    padding-top: 10px !important;
    padding-bottom: 30px !important;
    box-sizing: border-box !important;
}

/* Eliminate duplicate search capsule in Fichiers tab — mobileTopBar provides unified header */
.gfiles-main-search-wrap {
    display: none !important;
}

.frynzy-pro-settings-container {
    padding-top: 12px !important;
    padding-bottom: 70px !important;
    box-sizing: border-box !important;
}

/* ==========================================================================
   GLOBAL SAFE AREA INSETS PROTECTION (HEADERS & FOOTERS ACROSS ALL SCREENS)
   ========================================================================== */

/* 1. Category Explorer & Apps Fullscreen Screens (Images, Videos, Downloads, Audio, Docs, Apps) */
.gfiles-cat-screen,
#frynzyAppsScreen,
#frynzyCategoryDetailScreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    box-sizing: border-box !important;
}

.gfiles-cat-topbar,
.gfiles-cat-topbar.selection-bar,
#gfilesCatNormalTopbar,
#gfilesCatSelectionTopbar {
    height: calc(56px + var(--sat, 28px)) !important;
    min-height: calc(56px + var(--sat, 28px)) !important;
    padding-top: var(--sat, 28px) !important;
    padding-left: max(16px, var(--sal, 0px)) !important;
    padding-right: max(16px, var(--sar, 0px)) !important;
    padding-bottom: 0 !important;
    box-sizing: border-box !important;
}

.gfiles-cat-media-list,
#gfilesCatMediaContainer,
.gfiles-apps-list,
#gfilesAppsListContainer {
    padding-bottom: calc(48px + var(--sab, 48px)) !important;
    box-sizing: border-box !important;
    -webkit-overflow-scrolling: touch;
}

/* 2. Storage Explorer Modal (Internal Storage & SD Card) */
.gfiles-explorer-modal,
#frynzyStorageExplorerModal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    box-sizing: border-box !important;
    display: none;
    flex-direction: column !important;
    overflow: hidden !important;
}

.gfiles-explorer-modal.active,
#frynzyStorageExplorerModal.active {
    display: flex !important;
}

.gfiles-explorer-topbar,
#frynzyStorageExplorerModal .gfiles-explorer-topbar {
    height: calc(56px + var(--sat, 28px)) !important;
    min-height: calc(56px + var(--sat, 28px)) !important;
    padding-top: var(--sat, 28px) !important;
    padding-left: max(16px, var(--sal, 0px)) !important;
    padding-right: max(16px, var(--sar, 0px)) !important;
    padding-bottom: 0 !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
    z-index: 20 !important;
    background: #ffffff !important;
}

.gfiles-breadcrumb-bar,
#frynzyStorageExplorerModal .gfiles-breadcrumb-bar {
    flex-shrink: 0 !important;
    z-index: 15 !important;
    background: #ffffff !important;
}

.gfiles-explorer-bottom-bar,
#frynzyStorageExplorerModal .gfiles-explorer-bottom-bar {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: calc(68px + var(--sab, 48px)) !important;
    min-height: calc(68px + var(--sab, 48px)) !important;
    padding-bottom: var(--sab, 48px) !important;
    padding-top: 0 !important;
    padding-left: max(18px, var(--sal, 0px)) !important;
    padding-right: max(18px, var(--sar, 0px)) !important;
    box-sizing: border-box !important;
    z-index: 25 !important;
}

.gfiles-folders-container,
#gfilesFoldersContainer {
    flex: 1 1 0% !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior-y: contain !important;
    contain: layout style paint !important;
    transform: translateZ(0) !important;
    -webkit-transform: translateZ(0) !important;
    padding-bottom: calc(96px + var(--sab, 48px)) !important;
    box-sizing: border-box !important;
}

/* ─── FRYNZY IPHONE iOS CRYSTAL GLASS SELECTION & MODALS ─────────── */
.frynzy-ios-selection-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.28);
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none !important; /* Masqué par défaut (correction demandée par l'utilisateur) */
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    color: transparent;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 8;
    pointer-events: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Affichage du cercle de sélection uniquement en mode sélection actif */
.selection-mode-active .frynzy-ios-selection-badge {
    display: flex !important;
}

.gfiles-folder-card,
.gfiles-media-card,
.gfiles-folder-row,
.gfiles-media-row {
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    box-sizing: border-box !important;
    border: 1.5px solid transparent !important;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.gfiles-folder-card.selected,
.gfiles-media-card.selected {
    border: 2.5px solid #2563eb !important;
    border-color: #2563eb !important;
    outline: none !important;
    background: rgba(37, 99, 235, 0.08) !important;
    box-shadow: 0 0 0 1px #2563eb, 0 4px 14px rgba(37, 99, 235, 0.22) !important;
}

.gfiles-folder-row.selected,
.gfiles-media-row.selected {
    border: 2px solid #2563eb !important;
    border-color: #2563eb !important;
    outline: none !important;
    background: rgba(37, 99, 235, 0.08) !important;
    border-radius: 14px !important;
    box-shadow: 0 0 0 1px #2563eb, 0 4px 14px rgba(37, 99, 235, 0.18) !important;
}

.gfiles-folder-card.selected .frynzy-ios-selection-badge,
.gfiles-media-card.selected .frynzy-ios-selection-badge,
.gfiles-folder-row.selected .frynzy-ios-selection-badge,
.gfiles-media-row.selected .frynzy-ios-selection-badge {
    display: flex !important;
    background: #007aff !important;
    border-color: #007aff !important;
    color: #ffffff !important;
    box-shadow: 0 3px 10px rgba(0, 122, 255, 0.5) !important;
}

/* Menu Dropdown Style iPhone iOS */
.frynzy-ios-glass-menu {
    position: fixed;
    top: calc(56px + var(--sat, 28px) + 8px);
    right: max(16px, var(--sar, 0px));
    width: 250px;
    background: rgba(255, 255, 255, 0.88) !important;
    backdrop-filter: blur(28px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    border-radius: 20px !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22), 0 2px 8px rgba(0, 0, 0, 0.08), inset 0 1px 1px rgba(255, 255, 255, 0.9) !important;
    padding: 6px !important;
    z-index: 10001020 !important;
    animation: frynzyScaleMenu 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: top right;
}

@keyframes frynzyScaleMenu {
    0% { opacity: 0; transform: scale(0.85); }
    100% { opacity: 1; transform: scale(1); }
}

.frynzy-ios-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 14px;
    cursor: pointer;
    transition: background 0.15s ease;
    user-select: none;
    -webkit-user-select: none;
}

.frynzy-ios-menu-item:active {
    background: rgba(0, 0, 0, 0.06);
}

.frynzy-ios-menu-icon {
    width: 32px !important;
    height: 32px !important;
    border-radius: 10px !important;
    background: rgba(142, 142, 147, 0.14) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
    color: #64748b !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.95rem !important;
    flex-shrink: 0 !important;
}

.frynzy-ios-glass-menu .frynzy-ios-menu-icon i,
.frynzy-ios-glass-menu .frynzy-ios-menu-icon svg {
    color: #64748b !important;
    fill: #64748b !important;
}

.frynzy-ios-glass-menu .frynzy-ios-menu-item.destructive .frynzy-ios-menu-icon {
    background: rgba(239, 68, 68, 0.12) !important;
    color: #ef4444 !important;
}

.frynzy-ios-glass-menu .frynzy-ios-menu-item.destructive .frynzy-ios-menu-icon i {
    color: #ef4444 !important;
}

.frynzy-ios-menu-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1c1c1e;
    letter-spacing: -0.1px;
}

.frynzy-ios-menu-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.06);
    margin: 4px 6px;
}

/* Modales iPhone iOS Crystal Glass */
.frynzy-ios-crystal-backdrop {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, 0.45) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    z-index: 10000985 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: frynzyFadeIn 0.2s ease-out;
}

@keyframes frynzyFadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.frynzy-ios-crystal-dialog {
    width: 100%;
    max-width: 350px;
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(35px) saturate(190%) !important;
    -webkit-backdrop-filter: blur(35px) saturate(190%) !important;
    border: 1px solid rgba(255, 255, 255, 0.85) !important;
    border-radius: 24px !important;
    padding: 22px;
    box-shadow: 0 25px 65px rgba(0, 0, 0, 0.28), inset 0 1px 1.5px rgba(255, 255, 255, 1) !important;
    display: flex;
    flex-direction: column;
    gap: 14px;
    color: #1c1c1e;
    animation: frynzyDialogPop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes frynzyDialogPop {
    0% { opacity: 0; transform: scale(0.92) translateY(12px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* 3. Corbeille / Trash Screen */
.trash-dedicated-screen,
#trashDedicatedScreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    box-sizing: border-box !important;
}

.trash-top-bar,
.trash-sel-top-bar,
#trashNormalTopBar,
#trashSelTopBar {
    height: calc(56px + var(--sat, 28px)) !important;
    min-height: calc(56px + var(--sat, 28px)) !important;
    padding-top: var(--sat, 28px) !important;
    padding-left: max(16px, var(--sal, 0px)) !important;
    padding-right: max(16px, var(--sar, 0px)) !important;
    padding-bottom: 0 !important;
    box-sizing: border-box !important;
}

.trash-action-bottombar,
#trashActionBottomBar {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: calc(64px + var(--sab, 48px)) !important;
    min-height: calc(64px + var(--sab, 48px)) !important;
    padding-bottom: var(--sab, 48px) !important;
    padding-top: 0 !important;
    padding-left: max(18px, var(--sal, 0px)) !important;
    padding-right: max(18px, var(--sar, 0px)) !important;
    box-sizing: border-box !important;
}

.trash-scrollable-content,
#trashScrollableContent {
    padding-bottom: calc(88px + var(--sab, 48px)) !important;
    box-sizing: border-box !important;
}

/* 4. Dedicated Downloads Screen — flex column container with single dedicated scroll container */
.dl-dedicated-screen,
#dlDedicatedScreen,
#dlDedicatedScreen.tab-screen {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
    background: #ffffff;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    height: 100% !important;
    max-height: 100% !important;
    overflow-y: hidden !important;
    overflow-x: hidden !important;
    contain: layout style !important;
}

.dl-dedicated-header,
#dlDedicatedScreen .dl-dedicated-header {
    height: calc(54px + var(--sat, 28px)) !important;
    min-height: calc(54px + var(--sat, 28px)) !important;
    padding-top: var(--sat, 28px) !important;
    padding-left: max(18px, var(--sal, 0px)) !important;
    padding-right: max(18px, var(--sar, 0px)) !important;
    padding-bottom: 0 !important;
    box-sizing: border-box !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
    background: #ffffff !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    text-align: left !important;
    width: 100% !important;
}

.dl-dedicated-title,
#dlDedicatedScreen .dl-dedicated-title {
    margin: 0 !important;
    text-align: left !important;
    font-size: 1.45rem !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    letter-spacing: -0.02em !important;
}

body.dark-theme .dl-dedicated-header,
body.dark-theme #dlDedicatedScreen .dl-dedicated-header {
    background: #0f172a !important;
}

body.dark-theme .dl-dedicated-title,
body.dark-theme #dlDedicatedScreen .dl-dedicated-title {
    color: #f8fafc !important;
}

.dl-dedicated-scrollable,
#dlDedicatedScrollable {
    flex: 1 1 auto !important;
    height: auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior-y: contain !important;
    box-sizing: border-box !important;
    contain: layout style !important;
}

.dl-dedicated-list,
#dlDedicatedList {
    padding-bottom: calc(95px + var(--sab, 48px)) !important;
    box-sizing: border-box !important;
}

/* 5. Fullscreen Files Search Screen */
.gfiles-search-screen,
#gfilesSearchScreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    box-sizing: border-box !important;
}

.gfiles-search-topbar,
#gfilesSearchScreen .gfiles-search-topbar {
    height: calc(56px + var(--sat, 28px)) !important;
    min-height: calc(56px + var(--sat, 28px)) !important;
    padding-top: var(--sat, 28px) !important;
    padding-left: max(14px, var(--sal, 0px)) !important;
    padding-right: max(14px, var(--sar, 0px)) !important;
    padding-bottom: 0 !important;
    box-sizing: border-box !important;
}

.gfiles-search-content,
#gfilesSearchContent {
    padding-bottom: calc(80px + var(--sab, 48px)) !important;
    box-sizing: border-box !important;
}

/* 6. Vault / Dossier Sécurisé */
.frynzy-vault-fullscreen,
#frynzySecureFolderScreen,
#frynzySecureSettingsScreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    box-sizing: border-box !important;
}

.frynzy-vault-topbar {
    height: calc(56px + var(--sat, 28px)) !important;
    min-height: calc(56px + var(--sat, 28px)) !important;
    padding-top: var(--sat, 28px) !important;
    padding-left: max(16px, var(--sal, 0px)) !important;
    padding-right: max(16px, var(--sar, 0px)) !important;
    padding-bottom: 0 !important;
    box-sizing: border-box !important;
}

.frynzy-vault-body-scroll {
    padding-bottom: calc(48px + var(--sab, 48px)) !important;
    box-sizing: border-box !important;
}

/* 7. Dropdown Popups & Menus */
.gfiles-dropdown-popup,
#gfilesCatMenuPopup,
#gfilesCatSelMenuPopup,
#gfilesAppsMenuPopup,
#gfilesAppItemMenuPopup {
    top: calc(56px + var(--sat, 28px) + 8px) !important;
}

/* 8. Bottom Sheets */
.gfiles-bottom-sheet,
.frynzy-bottom-sheet,
#gfilesVolumeSheet,
#gfilesSortSheet,
#gfilesStorageFilterSheet,
#gfilesCatSortSheet,
#trashRestoreBottomSheet,
.gfiles-bottomsheet-backdrop .gfiles-bottomsheet-card {
    padding-bottom: calc(36px + var(--sab, 48px)) !important;
    box-sizing: border-box !important;
}

/* 9. Sidebar Drawer */
.main-sidebar,
#mainSidebar {
    padding-top: var(--sat, 28px) !important;
    padding-bottom: var(--sab, 48px) !important;
    box-sizing: border-box !important;
}

.main-sidebar:not(.open),
#mainSidebar:not(.open) {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    box-shadow: none !important;
    transform: translateX(-120%) !important;
}

.main-sidebar.open,
#mainSidebar.open {
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    box-shadow: 10px 0 40px rgba(0, 0, 0, 0.12) !important;
    transform: translateX(0) !important;
}

.sidebar-close-btn {
    top: calc(18px + var(--sat, 28px)) !important;
}

/* 10. Floating Mini Player */
.frynzy-mini-player,
#frynzyFloatingMiniPlayer {
    bottom: calc(68px + var(--sab, 48px)) !important;
}


/* Active / Hidden states for video, audio & image player views */
.frynzy-audio-view {
    display: none !important;
}
.frynzy-audio-view.active {
    display: flex !important;
}
.frynzy-video-view {
    display: none !important;
}
.frynzy-video-view.active {
    display: flex !important;
}
.frynzy-image-view {
    display: none !important;
}
.frynzy-image-view.active {
    display: flex !important;
}

/* Modal Mode Specific Overrides: STRICT ISOLATION */
.frynzy-player-modal:not(.mode-video) .frynzy-video-view,
.frynzy-player-modal:not(.mode-video) .frynzy-video-bottom-overlay {
    display: none !important;
}
.frynzy-player-modal.mode-audio .frynzy-video-view,
.frynzy-player-modal.mode-audio .frynzy-video-bottom-overlay,
.frynzy-player-modal.mode-audio .frynzy-image-view,
.frynzy-player-modal.mode-audio .frynzy-player-topbar,
.frynzy-player-modal.mode-audio .frynzy-player-top-controls {
    display: none !important;
}
.frynzy-player-modal.mode-audio .frynzy-audio-view {
    display: flex !important;
}
.frynzy-player-modal.mode-video .frynzy-audio-view,
.frynzy-player-modal.mode-video .frynzy-image-view {
    display: none !important;
}
.frynzy-player-modal.mode-video .frynzy-video-view {
    display: flex !important;
}
.frynzy-player-modal.mode-image .frynzy-audio-view,
.frynzy-player-modal.mode-image .frynzy-video-view,
.frynzy-player-modal.mode-image .frynzy-video-bottom-overlay {
    display: none !important;
}
.frynzy-player-modal.mode-image .frynzy-image-view {
    display: flex !important;
}

/* Never show floating bubble when player modal is active or body is modal-locked */
.player-modal-open #frynzyAudioBubble,
.frynzy-player-modal.active ~ #frynzyAudioBubble,
body.player-modal-open #frynzyAudioBubble {
    display: none !important;
}

/* =========================================================================
   GOOGLE FILES STYLE SETTINGS & SUB-SCREENS (CYPHER & GOOGLE FILES UI)
   ========================================================================= */

/* Main Settings Page Container */
#tabContentProfile {
    background: #ffffff !important;
}

.gfiles-settings-page {
    background: #ffffff;
    min-height: 100%;
    padding: 8px 0 100px;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #202124;
}

/* Grouped List Items */
.gfiles-setting-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 13px 18px;
    cursor: pointer;
    background: #ffffff;
    transition: background-color 0.15s ease;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.05);
}

.gfiles-setting-item:active {
    background: #f8f9fa;
}

/* Icon Container: Google Files Flat Grey Aesthetic */
.gfiles-icon-box {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f1f3f4;
    color: #5f6368;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
}

/* Text Information */
.gfiles-setting-info {
    flex: 1;
    min-width: 0;
}

.gfiles-setting-title {
    font-size: 15px;
    font-weight: 500;
    color: #202124;
    line-height: 1.35;
    margin-bottom: 2px;
}

.gfiles-setting-sub {
    font-size: 12.5px;
    color: #5f6368;
    line-height: 1.3;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* End Slot */
.gfiles-setting-end {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.gfiles-chevron {
    font-size: 13px;
    color: #80868b;
}

/* Section Header: Google Files Grey Small Caps */
.gfiles-section-header {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: #5f6368;
    padding: 16px 18px 6px;
}

/* Subtle Divider */
.gfiles-divider {
    height: 1px;
    background: #f1f3f4;
    margin: 6px 0;
}

/* Material & General Settings Toggle Switch — iPhone Frosted Glass */
.gfiles-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 30px;
    cursor: pointer;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

.gfiles-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.gfiles-switch-slider {
    position: absolute;
    inset: 0;
    background: rgba(225, 228, 236, 0.72);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1.5px solid rgba(255, 255, 255, 0.75);
    border-radius: 30px;
    transition: background 0.28s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.28s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
}

body.dark-theme .gfiles-switch-slider {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.gfiles-switch-slider::before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 2px;
    bottom: 1.5px;
    background-color: #ffffff;
    border-radius: 50%;
    transition: transform 0.28s cubic-bezier(0.25, 1, 0.5, 1),
                box-shadow 0.28s cubic-bezier(0.25, 1, 0.5, 1),
                width 0.18s ease;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2), 0 1px 2px rgba(0, 0, 0, 0.12);
}

.gfiles-switch input:checked + .gfiles-switch-slider {
    background: rgba(52, 199, 89, 0.92) !important;
    border-color: rgba(255, 255, 255, 0.6) !important;
    box-shadow: 0 3px 14px rgba(52, 199, 89, 0.42), inset 0 1px 1.5px rgba(255, 255, 255, 0.5) !important;
}

body.dark-theme .gfiles-switch input:checked + .gfiles-switch-slider {
    background: rgba(48, 209, 88, 0.9) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    box-shadow: 0 3px 16px rgba(48, 209, 88, 0.5), inset 0 1px 1.5px rgba(255, 255, 255, 0.4) !important;
}

.gfiles-switch input:checked + .gfiles-switch-slider::before {
    transform: translateX(20px);
    box-shadow: 0 3px 9px rgba(0, 0, 0, 0.25), 0 1px 3px rgba(0, 0, 0, 0.12);
}

.gfiles-switch:active .gfiles-switch-slider::before {
    width: 27px;
}

.gfiles-switch input:checked:active + .gfiles-switch-slider::before {
    transform: translateX(17px);
}

/* Action Button Pill (e.g. Cache Clear) */
.gfiles-action-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 18px;
    border: 1px solid #dadce0;
    background: #ffffff;
    color: #1a73e8;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gfiles-action-pill-btn:active {
    background: #e8f0fe;
    border-color: #1a73e8;
}

.gfiles-counter-badge {
    background: #f1f3f4;
    color: #5f6368;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
}

/* =========================================================================
   FULLSCREEN SUB-SCREENS (LANG, EDITOR, AUDIO, VIDEO)
   ========================================================================= */
.gfiles-sub-screen {
    position: fixed !important;
    inset: 0 !important;
    z-index: 10000150 !important!important;
    background: #ffffff !important;
    display: none;
    flex-direction: column !important;
    overflow: hidden !important;
    animation: gfilesSlideInRight 0.25s cubic-bezier(0.2, 0.9, 0.3, 1) forwards;
}

@keyframes gfilesSlideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.gfiles-sub-topbar {
    height: calc(56px + var(--sat, 28px)) !important;
    min-height: calc(56px + var(--sat, 28px)) !important;
    padding-top: var(--sat, 28px) !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    border-bottom: 1px solid #f1f3f4 !important;
    background: #ffffff !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
}

.gfiles-sub-topbar-title {
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #202124 !important;
    flex: 1 !important;
    text-align: left !important;
    margin-left: 12px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.gfiles-sub-back-btn,
.gfiles-sub-action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #5f6368;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.gfiles-sub-back-btn:active,
.gfiles-sub-action-btn:active {
    background: #f1f3f4;
    color: #202124;
}

.gfiles-sub-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(50px + var(--sab, 48px));
    box-sizing: border-box;
}

/* Sub-screen Search Bar */
.gfiles-sub-search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #f1f3f4;
    animation: gfilesFadeIn 0.2s ease;
}

.gfiles-sub-search-icon {
    color: #5f6368;
    font-size: 15px;
}

.gfiles-sub-search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14.5px;
    color: #202124;
}

.gfiles-sub-search-clear {
    border: none;
    background: transparent;
    color: #80868b;
    font-size: 14px;
    padding: 4px;
    cursor: pointer;
}

/* =========================================================================
   LANGUAGE SELECTION SCREEN (GOOGLE FILES REFERENCE IMAGE 2)
   ========================================================================= */
.gfiles-lang-body {
    padding: 14px 16px 60px;
    background: #f8f9fa;
}

.gfiles-lang-card-group {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f3f4;
}

.gfiles-lang-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 18px;
    font-size: 15px;
    color: #202124;
    cursor: pointer;
    border-bottom: 1px solid #f8f9fa;
    transition: background-color 0.15s;
}

.gfiles-lang-item:last-child {
    border-bottom: none;
}

.gfiles-lang-item:active {
    background: #f1f3f4;
}

.gfiles-lang-item.selected {
    font-weight: 700;
    color: #111827;
}

.gfiles-lang-check {
    color: #ec4899; /* Pink color */
    font-size: 16px;
    font-weight: bold;
}

.gfiles-lang-section-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #5f6368;
    padding: 20px 6px 10px;
}

/* =========================================================================
   IPHONE FROSTED GLASS CONTROLS (THEME, SYNTAX, PERMISSIONS, DRAWER)
   ========================================================================= */

/* 3-State iPhone Frosted Glass Segmented Control */
.iphone-glass-segmented {
    display: inline-flex;
    background: rgba(235, 236, 242, 0.75) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border-radius: 30px !important;
    padding: 3px !important;
    gap: 3px !important;
    border: 1px solid rgba(255, 255, 255, 0.65) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
}

body.dark-theme .iphone-glass-segmented {
    background: rgba(28, 28, 34, 0.75) !important;
    border-color: rgba(255, 255, 255, 0.16) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

.iphone-seg-btn {
    border: none !important;
    background: transparent !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #64748b !important;
    padding: 6px 14px !important;
    border-radius: 24px !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    white-space: nowrap !important;
    outline: none !important;
}

body.dark-theme .iphone-seg-btn {
    color: rgba(255, 255, 255, 0.65) !important;
}

.iphone-seg-btn.active {
    background: #ffffff !important;
    color: #000000 !important;
    font-weight: 700 !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.14), 0 1px 3px rgba(0, 0, 0, 0.08) !important;
    transform: scale(1.02) !important;
}

body.dark-theme .iphone-seg-btn.active {
    background: #ffffff !important;
    color: #000000 !important;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.4) !important;
}

/* Syntax Pill Badge */
.iphone-glass-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(241, 243, 249, 0.85);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 12.5px;
    font-weight: 600;
    color: #0f172a;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.65);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
}

body.dark-theme .iphone-glass-badge {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.iphone-glass-badge:active {
    background: #e2e8f0;
    transform: scale(0.97);
}

/* iPhone Frosted Glass Toggle Switch — Green Activation Pill */
.iphone-glass-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 30px;
    cursor: pointer;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

.iphone-glass-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.iphone-glass-thumb {
    position: absolute;
    inset: 0;
    background: rgba(225, 228, 236, 0.72);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1.5px solid rgba(255, 255, 255, 0.75);
    border-radius: 30px;
    transition: background 0.28s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.28s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
}

body.dark-theme .iphone-glass-thumb {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.iphone-glass-thumb::before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 2px;
    bottom: 1.5px;
    background-color: #ffffff;
    border-radius: 50%;
    transition: transform 0.28s cubic-bezier(0.25, 1, 0.5, 1),
                box-shadow 0.28s cubic-bezier(0.25, 1, 0.5, 1),
                width 0.18s ease;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2), 0 1px 2px rgba(0, 0, 0, 0.12);
}

.iphone-glass-switch input:checked + .iphone-glass-thumb {
    background: rgba(52, 199, 89, 0.92) !important;
    border-color: rgba(255, 255, 255, 0.6) !important;
    box-shadow: 0 3px 14px rgba(52, 199, 89, 0.42), inset 0 1px 1.5px rgba(255, 255, 255, 0.5) !important;
}

body.dark-theme .iphone-glass-switch input:checked + .iphone-glass-thumb {
    background: rgba(48, 209, 88, 0.9) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    box-shadow: 0 3px 16px rgba(48, 209, 88, 0.5), inset 0 1px 1.5px rgba(255, 255, 255, 0.4) !important;
}

.iphone-glass-switch input:checked + .iphone-glass-thumb::before {
    transform: translateX(20px);
    box-shadow: 0 3px 9px rgba(0, 0, 0, 0.25), 0 1px 3px rgba(0, 0, 0, 0.12);
}

.iphone-glass-switch:active .iphone-glass-thumb::before {
    width: 27px;
}

.iphone-glass-switch input:checked:active + .iphone-glass-thumb::before {
    transform: translateX(17px);
}

/* Glass Modals & Drawers Backdrop */
.iphone-glass-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100020;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: gfilesFadeIn 0.25s ease forwards;
}

@keyframes gfilesFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Sliding Frosted Drawer */
.iphone-glass-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 75vh;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(35px);
    -webkit-backdrop-filter: blur(35px);
    border-top-left-radius: 26px;
    border-top-right-radius: 26px;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    z-index: 100025;
    padding-bottom: max(20px, var(--sab, 24px));
    border: 1px solid rgba(255, 255, 255, 0.6);
    animation: gfilesSlideUp 0.3s cubic-bezier(0.2, 0.9, 0.3, 1) forwards;
}

@keyframes gfilesSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.iphone-drawer-handle {
    width: 42px;
    height: 5px;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.18);
    margin: 10px auto 4px;
}

.iphone-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px 14px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.iphone-drawer-title {
    font-size: 17px;
    font-weight: 700;
    color: #111827;
}

.iphone-drawer-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.06);
    color: #64748b;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.iphone-drawer-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 10px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Glass Card Item inside Drawer */
.iphone-glass-card-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: all 0.2s;
    color: #1f2937;
    font-size: 15px;
    font-weight: 500;
}

.iphone-glass-card-item:active {
    background: rgba(59, 130, 246, 0.12);
    border-color: #3b82f6;
    transform: scale(0.98);
}

.iphone-glass-card-item.active {
    background: rgba(59, 130, 246, 0.15);
    border-color: #3b82f6;
    color: #1d4ed8;
    font-weight: 700;
}

/* Dialog Cards */
.iphone-security-dialog {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: 24px;
    padding: 24px 20px;
    width: 100%;
    max-width: 350px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-sizing: border-box;
    animation: gfilesPopIn 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes gfilesPopIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.iphone-security-icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #e0f2fe;
    color: #0284c7;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
}

.iphone-security-title {
    font-size: 17px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
}

.iphone-security-desc {
    font-size: 13.5px;
    color: #4b5563;
    line-height: 1.45;
    margin-bottom: 20px;
}

.iphone-security-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.iphone-security-actions.vertical {
    flex-direction: column;
    gap: 8px;
}

.iphone-btn-primary {
    flex: 1;
    padding: 12px 18px;
    border-radius: 14px;
    border: none;
    background: #3b82f6;
    color: #ffffff;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.iphone-btn-primary:active {
    background: #2563eb;
}

.iphone-btn-accent {
    flex: 1;
    padding: 12px 18px;
    border-radius: 14px;
    border: none;
    background: #8b5cf6;
    color: #ffffff;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
}

.iphone-btn-accent:active {
    background: #7c3aed;
}

.iphone-btn-secondary {
    padding: 12px 18px;
    border-radius: 14px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #4b5563;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
}

.iphone-btn-secondary:active {
    background: #f3f4f6;
}

/* Lock Options List */
.iphone-lock-options-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
}

.iphone-lock-option-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.2s;
}

.iphone-lock-option-card:active {
    background: #eff6ff;
    border-color: #3b82f6;
}

.iphone-lock-opt-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.iphone-lock-opt-info {
    flex: 1;
    min-width: 0;
}

.iphone-lock-opt-title {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 2px;
}

.iphone-lock-opt-sub {
    font-size: 11.5px;
    color: #64748b;
    line-height: 1.3;
}

.iphone-chevron {
    font-size: 12px;
    color: #94a3b8;
}

/* PIN Display & Keypad */
.iphone-pin-display {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin: 12px 0 20px;
}

.pin-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #94a3b8;
    background: transparent;
    transition: all 0.2s;
}

.pin-dot.filled {
    background: #3b82f6;
    border-color: #3b82f6;
    transform: scale(1.1);
}

.iphone-pin-pad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    max-width: 240px;
    margin: 0 auto 10px;
}

.iphone-key-btn {
    height: 52px;
    border-radius: 50%;
    border: none;
    background: rgba(241, 245, 249, 0.9);
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s;
}

.iphone-key-btn:active {
    background: #cbd5e1;
}

.iphone-key-btn.empty {
    background: transparent;
    cursor: default;
}

/* Video/Photo Segmented Controls — iPhone Frosted Glass */
.gfiles-seg-selector {
    display: inline-flex;
    background: rgba(235, 236, 242, 0.75) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border-radius: 30px !important;
    padding: 3px !important;
    gap: 3px !important;
    border: 1px solid rgba(255, 255, 255, 0.65) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
}

body.dark-theme .gfiles-seg-selector {
    background: rgba(28, 28, 34, 0.75) !important;
    border-color: rgba(255, 255, 255, 0.16) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

.gfiles-seg-btn {
    border: none !important;
    background: transparent !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #64748b !important;
    padding: 5px 13px !important;
    border-radius: 20px !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    white-space: nowrap !important;
    outline: none !important;
}

body.dark-theme .gfiles-seg-btn {
    color: rgba(255, 255, 255, 0.65) !important;
}

.gfiles-seg-btn.active {
    background: #ffffff !important;
    color: #000000 !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16), 0 1px 3px rgba(0, 0, 0, 0.08) !important;
    transform: scale(1.02) !important;
}

body.dark-theme .gfiles-seg-btn.active {
    background: #ffffff !important;
    color: #000000 !important;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.4) !important;
}

/* Light Theme Mode for Code Editor */
.frynzy-code-editor-modal.theme-light {
    background: #ffffff !important;
    color: #1f2937 !important;
}

.frynzy-code-editor-modal.theme-light .frynzy-code-topbar {
    background: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
    color: #0f172a !important;
}

.frynzy-code-editor-modal.theme-light .frynzy-code-filename {
    color: #0f172a !important;
}

.frynzy-code-editor-modal.theme-light .frynzy-code-icon-btn {
    color: #475569 !important;
}

.frynzy-code-editor-modal.theme-light .frynzy-code-viewport {
    background: #ffffff !important;
}

.frynzy-code-editor-modal.theme-light .frynzy-code-cell-num {
    background: #f8fafc !important;
    color: #94a3b8 !important;
    border-right: 1px solid #e2e8f0 !important;
}

.frynzy-code-editor-modal.theme-light .frynzy-code-cell-code {
    color: #0f172a !important;
}

.frynzy-code-editor-modal.theme-light .frynzy-code-row.active {
    background: rgba(59, 130, 246, 0.08) !important;
}

/* ======================================================
   iOS 17 CRYSTAL GLASS FILES UI
   White frosted glass aesthetic for the Fichiers section
   ====================================================== */

/* Section background — clean pure white matching page background */
#tabContentLecture,
.lecture-screen-container,
.gfiles-lecture-container,
body:not(.dark-theme) #gfilesRecentSection,
body:not(.dark-theme) .gfiles-recent-section,
body:not(.dark-theme) .gfiles-recent-carousel {
    background: #ffffff;
}

/* Search pill — frosted glass pill, iOS 17 style */
.gfiles-search-pill {
    background: rgba(255, 255, 255, 0.82) !important;
    border: 1px solid rgba(255, 255, 255, 0.9) !important;
    border-radius: 14px !important;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08), 0 0 0 0.5px rgba(0,0,0,0.06) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
}

/* Tile cards — glass morphism cards */
.gfiles-tile-card {
    background: rgba(255, 255, 255, 0.78) !important;
    border: 1px solid rgba(255, 255, 255, 0.95) !important;
    border-radius: 18px !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07), 0 0 0 0.5px rgba(0,0,0,0.04) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
}

.gfiles-tile-card:active {
    background: rgba(240, 242, 247, 0.9) !important;
    transform: scale(0.97) !important;
}

/* Tile icon boxes — iPhone Frosted Depolished Crystal Glass & Pure Black Icons */
.gfiles-tile-icon {
    border-radius: 12px !important;
    background: #f1f5f9 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    color: #000000 !important;
}

.gfiles-tile-card .gfiles-tile-icon,
.gfiles-tile-card:nth-child(n) .gfiles-tile-icon {
    background: #f1f5f9 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

.gfiles-tile-card .gfiles-tile-icon i,
.gfiles-tile-card .gfiles-tile-icon svg,
.gfiles-tile-card:nth-child(n) .gfiles-tile-icon i,
.gfiles-tile-card:nth-child(n) .gfiles-tile-icon svg {
    color: #000000 !important;
    fill: #000000 !important;
}

body.dark-theme .gfiles-tile-icon,
[data-theme="dark"] .gfiles-tile-icon,
body.dark-theme .gfiles-tile-card:nth-child(n) .gfiles-tile-icon,
[data-theme="dark"] .gfiles-tile-card:nth-child(n) .gfiles-tile-icon {
    background: #1e293b !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
}

body.dark-theme .gfiles-tile-card .gfiles-tile-icon i,
body.dark-theme .gfiles-tile-card .gfiles-tile-icon svg,
[data-theme="dark"] .gfiles-tile-card .gfiles-tile-icon i,
[data-theme="dark"] .gfiles-tile-card .gfiles-tile-icon svg {
    color: #000000 !important;
    fill: #000000 !important;
}

/* Recent carousel cards — glass style */
.gfiles-recent-card,
.gfiles-hero-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 18px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    overflow: hidden !important;
}

/* Section header titles — iOS-style bold gray */
.gfiles-section-title,
.gfiles-recent-title,
.gfiles-tile-name {
    color: #1c1c1e !important;
    font-weight: 700 !important;
}

.gfiles-tile-sub,
.gfiles-recent-card-tag,
.gfiles-tile-info span:last-child {
    color: #8e8e93 !important;
    font-size: 0.78rem !important;
}

/* Récents section background strip */
.gfiles-recent-section {
    background: transparent !important;
}

/* Settings-like list items in profile/lecture tabs — glass cards */
.gfiles-setting-card,
.gfiles-pref-row {
    background: rgba(255, 255, 255, 0.82) !important;
    border: 1px solid rgba(255, 255, 255, 0.95) !important;
    border-radius: 14px !important;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
}

/* ========================================================================= */
/* 11. ULTRA-REALISTIC IOS 17 CRYSTAL GLASS & WHITE GEL SUITE                 */
/* ========================================================================= */

/* A. DOCK NAVIGATION SLIDING ACTIVE PILL */
.frynzy-tab-slider-pill {
    position: absolute !important;
    top: 5px !important;
    bottom: 5px !important;
    left: 6px !important;
    width: calc((100% - 12px) / 4) !important;
    background: rgba(255, 255, 255, 0.96) !important;
    border-radius: 26px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12), 0 1px 4px rgba(0, 0, 0, 0.06) !important;
    border: 0.5px solid rgba(255, 255, 255, 0.95) !important;
    pointer-events: none !important;
    z-index: 1 !important;
    transition: transform 0.28s cubic-bezier(0.25, 1, 0.5, 1) !important;
    will-change: transform !important;
}

body.dark-theme .frynzy-tab-slider-pill {
    background: rgba(255, 255, 255, 0.16) !important;
    border: 0.5px solid rgba(255, 255, 255, 0.25) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35) !important;
}

.frynzy-tab-btn {
    position: relative !important;
    z-index: 2 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.frynzy-tab-btn.active {
    background: transparent !important;
    box-shadow: none !important;
}

/* B. SEQUENTIAL IOS CRYSTAL GLASS PERMISSION MODAL (WHITE GEL & FROSTED GLASS) */
.frynzy-ios-perm-backdrop {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, 0.38) !important;
    backdrop-filter: blur(25px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(25px) saturate(180%) !important;
    z-index: 100020 !important;
    display: none;
    align-items: center !important;
    justify-content: center !important;
    padding: 24px !important;
    animation: fpermFadeIn 0.25s ease !important;
}

.frynzy-ios-perm-backdrop.visible {
    display: flex !important;
}

.frynzy-ios-perm-backdrop:not(.visible) {
    display: none !important;
}

@keyframes fpermFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.frynzy-ios-perm-card {
    width: 100% !important;
    max-width: 320px !important;
    background: rgba(255, 255, 255, 0.88) !important;
    backdrop-filter: blur(40px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(40px) saturate(200%) !important;
    border: 1px solid rgba(255, 255, 255, 0.9) !important;
    border-radius: 28px !important;
    padding: 26px 20px 22px !important;
    text-align: center !important;
    box-shadow: 0 25px 65px rgba(0, 0, 0, 0.22), 0 0 0 0.5px rgba(255, 255, 255, 0.9) inset !important;
    animation: fpermCardScale 0.28s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    box-sizing: border-box !important;
}

@keyframes fpermCardScale {
    from { transform: scale(0.92); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.frynzy-ios-perm-icon-wrap {
    width: 60px !important;
    height: 60px !important;
    margin: 0 auto 12px !important;
    background: rgba(142, 142, 147, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #48484a !important;
    font-size: 1.5rem !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
}

.frynzy-ios-perm-badge {
    display: inline-block !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: #8e8e93 !important;
    margin-bottom: 6px !important;
}

.frynzy-ios-perm-title {
    font-size: 1.18rem !important;
    font-weight: 700 !important;
    color: #1c1c1e !important;
    margin: 0 0 8px 0 !important;
    letter-spacing: -0.3px !important;
}

.frynzy-ios-perm-desc {
    font-size: 0.86rem !important;
    line-height: 1.35 !important;
    color: #3a3a3c !important;
    margin: 0 0 20px 0 !important;
    padding: 0 6px !important;
}

.frynzy-ios-perm-btn-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
}

.frynzy-ios-perm-btn {
    width: 100% !important;
    padding: 13px 16px !important;
    border-radius: 16px !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    outline: none !important;
    transition: transform 0.15s ease, background 0.15s ease !important;
    box-sizing: border-box !important;
}

.frynzy-ios-perm-btn:active {
    transform: scale(0.97) !important;
}

.frynzy-ios-perm-btn.fperm-allow {
    background: rgba(0, 122, 255, 0.15) !important;
    color: #007aff !important;
    border: 1px solid rgba(0, 122, 255, 0.3) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
}

.frynzy-ios-perm-btn.fperm-skip {
    background: rgba(142, 142, 147, 0.12) !important;
    color: #636366 !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
}

/* C. GUIDE D'UTILISATION IOS CRYSTAL GLASS */
.ios-guide-container {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(35px) saturate(190%) !important;
    -webkit-backdrop-filter: blur(35px) saturate(190%) !important;
    border: 1px solid rgba(255, 255, 255, 0.85) !important;
    border-radius: 28px !important;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.2) !important;
    max-width: 480px !important;
    width: 92% !important;
}

.ios-guide-body {
    padding: 16px 20px !important;
}

.guide-ios-card {
    background: rgba(255, 255, 255, 0.72) !important;
    border: 1px solid rgba(255, 255, 255, 0.9) !important;
    border-radius: 16px !important;
    padding: 12px 14px !important;
    margin-bottom: 10px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04) !important;
}

.guide-ios-card-title {
    font-size: 0.92rem !important;
    font-weight: 700 !important;
    color: #1c1c1e !important;
    margin-bottom: 4px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.guide-ios-card-desc {
    font-size: 0.82rem !important;
    color: #636366 !important;
    line-height: 1.35 !important;
    margin: 0 !important;
}

.ios-consent-box {
    background: rgba(255, 255, 255, 0.75) !important;
    border: 1px solid rgba(255, 255, 255, 0.9) !important;
    border-radius: 18px !important;
    padding: 14px 16px !important;
    margin-top: 14px !important;
}

.ios-consent-header h4 {
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    color: #1c1c1e !important;
    margin: 0 0 10px 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.ios-switch-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 10px 0 !important;
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.08) !important;
    cursor: pointer !important;
}

.ios-switch-row:last-child {
    border-bottom: none !important;
}

.ios-switch-label {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
}

.ios-switch-label strong {
    font-size: 0.86rem !important;
    color: #1c1c1e !important;
}

.ios-switch-label span {
    font-size: 0.75rem !important;
    color: #8e8e93 !important;
}

.ios-switch-toggle {
    width: 50px !important;
    height: 30px !important;
    background: #e5e5ea !important;
    border-radius: 15px !important;
    position: relative !important;
    transition: background 0.25s ease !important;
    flex-shrink: 0 !important;
}

.ios-switch-handle {
    width: 26px !important;
    height: 26px !important;
    background: #ffffff !important;
    border-radius: 50% !important;
    position: absolute !important;
    top: 2px !important;
    left: 2px !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2) !important;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.ios-switch-toggle.active {
    background: #34c759 !important;
}

.ios-switch-toggle.active .ios-switch-handle {
    transform: translateX(20px) !important;
}

.guide-perm-link-btn {
    background: rgba(0, 122, 255, 0.1) !important;
    color: #007aff !important;
    border: 1px solid rgba(0, 122, 255, 0.2) !important;
    border-radius: 14px !important;
    padding: 9px 16px !important;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.ios-welcome-footer {
    padding: 14px 20px 18px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    background: transparent !important;
}

.ios-btn-accept {
    width: 100% !important;
    padding: 14px !important;
    border-radius: 18px !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    background: #007aff !important;
    color: #ffffff !important;
    border: none !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    transition: opacity 0.2s ease, transform 0.15s ease !important;
}

.ios-btn-accept:disabled {
    opacity: 0.45 !important;
    cursor: not-allowed !important;
}

/* D. TÉLÉCHARGEMENT (TAB 1) — PURE CRYSTAL GLASS & WHITE GEL */
#tabContentSearch {
    background: #f2f2f7 !important;
}

#tabContentSearch {
    background: #f2f2f7 !important;
    contain: content !important;
    transform: translateZ(0) !important;
    -webkit-transform: translateZ(0) !important;
    will-change: scroll-position !important;
    overscroll-behavior-y: contain !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
    scroll-behavior: auto !important;
}

body.dark-theme #tabContentSearch {
    background: #09080e !important;
}

#tabContentSearch .card {
    background: #ffffff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1px solid rgba(0, 0, 0, 0.07) !important;
    border-radius: 20px !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04) !important;
    padding: 16px 18px !important;
    margin-bottom: 16px !important;
    contain: layout style !important;
    transform: translateZ(0) !important;
    -webkit-transform: translateZ(0) !important;
    transition: transform 0.15s ease !important;
}

body.dark-theme #tabContentSearch .card {
    background: #181824 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35) !important;
}

#tabContentSearch .card-header {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    margin-bottom: 12px !important;
}

#tabContentSearch .icon-title {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
    min-width: 0 !important;
}

#tabContentSearch .icon-title i {
    font-size: 1.6rem !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

#tabContentSearch .icon-title h3,
#tabContentSearch .card-header h3 {
    color: #1c1c1e !important;
    font-weight: 700 !important;
    font-size: 1.15rem !important;
    margin: 0 !important;
    display: inline-block !important;
}

#tabContentSearch .badge {
    margin-left: auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 4px 12px !important;
    border-radius: 20px !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    background: rgba(127, 0, 255, 0.1) !important;
    color: #7f00ff !important;
    border: 1px solid rgba(127, 0, 255, 0.25) !important;
    flex-shrink: 0 !important;
}

#tabContentSearch .card-desc {
    color: #636366 !important;
    font-size: 0.82rem !important;
    margin-bottom: 12px !important;
}

#tabContentSearch .input-area {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: rgba(240, 240, 245, 0.85) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 16px !important;
    padding: 4px 6px 4px 12px !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
}

#tabContentSearch .service-input {
    flex: 1 !important;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    font-size: 0.88rem !important;
    color: #1c1c1e !important;
    padding: 8px 0 !important;
}

#tabContentSearch .service-input::placeholder {
    color: #8e8e93 !important;
}

#tabContentSearch .btn-action {
    width: 36px !important;
    height: 36px !important;
    border-radius: 12px !important;
    background: #007aff !important;
    color: #ffffff !important;
    border: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.35) !important;
}

/* E. RECHERCHE & CALENDRIER PÉRIODE STYLE IPHONE */
.gfiles-search-topbar {
    background: rgba(255, 255, 255, 0.82) !important;
    backdrop-filter: blur(25px) !important;
    -webkit-backdrop-filter: blur(25px) !important;
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.1) !important;
}

.gfiles-search-input-wrap {
    background: rgba(240, 240, 245, 0.9) !important;
    border-radius: 14px !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
}

.gfiles-calendar-modal {
    background: rgba(255, 255, 255, 0.94) !important;
    backdrop-filter: blur(30px) !important;
    -webkit-backdrop-filter: blur(30px) !important;
}

.gfiles-calendar-save-btn {
    background: rgba(0, 122, 255, 0.12) !important;
    color: #007aff !important;
    border-radius: 14px !important;
    padding: 6px 14px !important;
    font-weight: 700 !important;
}

/* ==========================================================================
   12. NOTIFICATION TONES SELECTION (IPHONE CRYSTAL GLASS)
   ========================================================================== */
.frynzy-tone-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 6px;
    margin-bottom: 12px;
}

.frynzy-tone-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

body.dark-theme .frynzy-tone-item {
    background: rgba(30, 41, 59, 0.5);
    border-color: rgba(255, 255, 255, 0.08);
}

.frynzy-tone-item:active {
    transform: scale(0.98);
}

.frynzy-tone-item.active {
    background: rgba(0, 122, 255, 0.08);
    border-color: rgba(0, 122, 255, 0.35);
}

body.dark-theme .frynzy-tone-item.active {
    background: rgba(0, 122, 255, 0.2);
    border-color: rgba(0, 122, 255, 0.5);
}

.frynzy-tone-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.frynzy-tone-play-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 122, 255, 0.12);
    color: #007aff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.15s ease, background 0.15s ease;
}

.frynzy-tone-play-btn:active {
    transform: scale(0.9);
}

.frynzy-tone-play-btn.playing {
    background: #007aff;
    color: #ffffff;
    animation: tonePulse 1s infinite alternate;
}

@keyframes tonePulse {
    from { transform: scale(1); }
    to { transform: scale(1.08); }
}

.frynzy-tone-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.frynzy-tone-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.dark-theme .frynzy-tone-name {
    color: #f8fafc;
}

.frynzy-tone-desc {
    font-size: 0.78rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}

.frynzy-tone-check {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    font-size: 0.75rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.frynzy-tone-item.active .frynzy-tone-check {
    border-color: #007aff;
    background: #007aff;
    color: #ffffff;
}

/* Custom device audio button card */
.frynzy-custom-sound-box {
    margin-top: 8px;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.08), rgba(59, 130, 246, 0.08));
    border: 1px dashed rgba(168, 85, 247, 0.3);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s ease;
}

body.dark-theme .frynzy-custom-sound-box {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(59, 130, 246, 0.15));
    border-color: rgba(168, 85, 247, 0.4);
}

.frynzy-custom-sound-box:active {
    transform: scale(0.98);
}

/* ==========================================================================
   13. SYSTEM FILE PICKER TOP BANNER (FOR WHATSAPP, TELEGRAM, ETC.)
   ========================================================================== */
.frynzy-file-picker-banner {
    position: fixed !important;
    top: var(--sat, 28px) !important;
    left: 10px !important;
    right: 10px !important;
    z-index: 9999 !important;
    background: rgba(15, 23, 42, 0.94) !important;
    backdrop-filter: blur(25px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(25px) saturate(180%) !important;
    color: #ffffff !important;
    border-radius: 20px !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35) !important;
    padding: 10px 14px !important;
    display: none !important;
}

.frynzy-file-picker-banner.active {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    animation: pickerSlideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

@keyframes pickerSlideDown {
    from { transform: translateY(-40px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.frynzy-picker-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.frynzy-picker-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1rem;
    flex-shrink: 0;
}

.frynzy-picker-texts {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.frynzy-picker-title {
    font-size: 0.88rem;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.frynzy-picker-sub {
    font-size: 0.72rem;
    color: #cbd5e1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.frynzy-picker-cancel-btn {
    background: rgba(255, 255, 255, 0.16);
    border: none;
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s;
}

.frynzy-picker-cancel-btn:active {
    background: rgba(255, 255, 255, 0.3);
}

.frynzy-picker-send-btn {
    background: #10b981;
    border: none;
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 12px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.15s;
}

.frynzy-picker-send-btn:active {
    transform: scale(0.95);
}


/* ═══════════════════════════════════════════════════════════════════════════
   FRYNZY AUDIO PLAYER — iOS Lockscreen Crystal Glass Card (fap-*)
   ═══════════════════════════════════════════════════════════════════════════ */

/* Full-screen backdrop container */
.frynzy-audio-view {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #000000;
}

/* Ambient background: blurred album art fills entire screen */
.fap-backdrop {
    position: absolute;
    inset: -30px;
    background: #0c0b14;
    background-size: cover;
    background-position: center;
    filter: blur(55px) saturate(1.8) brightness(0.45);
    transform: scale(1.15);
    z-index: 0;
    cursor: pointer;
}

/* iOS Fullscreen Crystal Glassmorphism Card */
.fap-glass-card {
    position: fixed;
    inset: 0;
    z-index: 2;
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: max(16px, env(safe-area-inset-top, 24px)) 24px max(24px, env(safe-area-inset-bottom, 24px)) 24px;
    box-sizing: border-box;
    background: rgba(18, 16, 26, 0.65);
    backdrop-filter: blur(40px) saturate(190%);
    -webkit-backdrop-filter: blur(40px) saturate(190%);
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    animation: fapCardIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fapCardIn {
    from { opacity: 0; transform: scale(0.96) translateY(15px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Top drag/dismiss handle */
.fap-top-handle {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 6px 0 12px 0;
    cursor: pointer;
    touch-action: pan-y;
}
.fap-handle-bar {
    width: 44px;
    height: 5px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.4);
    transition: background 0.2s, transform 0.2s;
}
.fap-top-handle:active .fap-handle-bar {
    background: rgba(255, 255, 255, 0.85);
    transform: scaleX(1.15);
}

/* ─── Cover Art (HD Square 1:1) ─── */
.fap-artwork-card {
    /* Responsive: s'adapte en fonction de la hauteur disponible pour laisser de la place aux paroles et aux commandes */
    width: min(82vw, 38vh, 320px) !important;
    max-width: min(82vw, 320px) !important;
    max-height: min(38vh, 320px) !important;
    min-width: 140px !important;
    min-height: 140px !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 24px !important;
    overflow: hidden !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    background: #161424 !important;
    flex-shrink: 1 !important;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s ease !important;
    transform: scale(0.97);
    margin: 4px auto !important;
}
.fap-artwork-card.playing {
    transform: scale(1.0);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75), 0 6px 20px rgba(0, 0, 0, 0.45);
}
.fap-artwork-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 24px;
    display: block;
}

/* ─── Track Info & Equalizer ─── */
.fap-track-info-row {
    width: min(92vw, 750px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px !important;
    margin-bottom: 4px !important;
    padding: 0 2px;
    box-sizing: border-box;
    flex-shrink: 0 !important;
}
.fap-track-text {
    flex: 1;
    min-width: 0;
    margin-right: 12px;
}
.fap-track-title {
    font-size: clamp(1.15rem, 2.6vw, 1.85rem);
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.2px;
    line-height: 1.25;
}
.fap-track-artist {
    font-size: clamp(0.88rem, 1.8vw, 1.25rem);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.65);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

/* 5-Bar Vertical Equalizer Icon */
.fap-eq-bars {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 22px;
    padding-bottom: 2px;
    flex-shrink: 0;
}
.fap-eq-bar {
    width: 3.5px;
    background: #ffffff;
    border-radius: 2px;
    transition: height 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
/* Resting static heights when paused */
.fap-eq-bar.bar-1 { height: 8px; }
.fap-eq-bar.bar-2 { height: 14px; }
.fap-eq-bar.bar-3 { height: 20px; }
.fap-eq-bar.bar-4 { height: 12px; }
.fap-eq-bar.bar-5 { height: 6px; }

/* Dynamic bouncing heights when playing (.animating) */
.fap-eq-bars.animating .bar-1 {
    animation: fapEqAnim1 0.75s ease-in-out infinite alternate;
}
.fap-eq-bars.animating .bar-2 {
    animation: fapEqAnim2 0.55s ease-in-out infinite alternate;
}
.fap-eq-bars.animating .bar-3 {
    animation: fapEqAnim3 0.85s ease-in-out infinite alternate;
}
.fap-eq-bars.animating .bar-4 {
    animation: fapEqAnim4 0.65s ease-in-out infinite alternate;
}
.fap-eq-bars.animating .bar-5 {
    animation: fapEqAnim5 0.90s ease-in-out infinite alternate;
}

@keyframes fapEqAnim1 {
    0% { height: 4px; }
    50% { height: 18px; }
    100% { height: 9px; }
}
@keyframes fapEqAnim2 {
    0% { height: 16px; }
    50% { height: 6px; }
    100% { height: 22px; }
}
@keyframes fapEqAnim3 {
    0% { height: 8px; }
    50% { height: 24px; }
    100% { height: 14px; }
}
@keyframes fapEqAnim4 {
    0% { height: 20px; }
    50% { height: 8px; }
    100% { height: 18px; }
}
@keyframes fapEqAnim5 {
    0% { height: 6px; }
    50% { height: 16px; }
    100% { height: 4px; }
}

/* ─── Horizon Timeline (Samsung One UI Wave) ─── */
.fap-timeline-wrap {
    width: min(92vw, 750px);
    margin-top: 6px !important;
    margin-bottom: 4px !important;
    flex-shrink: 0 !important;
}
.fap-horizon-track {
    position: relative;
    width: 100%;
    height: 38px;
    display: flex;
    align-items: center;
}
.fap-horizon-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}
.fap-seek-range {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
    margin: 0;
    padding: 0;
    -webkit-appearance: none;
}
.fap-time-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 2px;
    padding: 0 2px;
}
.fap-time-cur, .fap-time-rem {
    font-size: clamp(0.72rem, 1.4vw, 0.95rem);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.2px;
    font-variant-numeric: tabular-nums;
}

/* ─── Controls Row (Pure White Glyphs on Glass) ─── */
.fap-controls-row {
    width: min(92vw, 750px);
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    margin-top: 14px;
    margin-bottom: 6px;
}
.fap-ctrl-btn {
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s, opacity 0.15s;
}
.fap-ctrl-btn:active {
    transform: scale(0.85);
    opacity: 0.6;
}
.fap-ctrl-btn.locked,
.frynzy-ctrl-icon-btn.locked,
.frynzy-photo-nav-btn.locked {
    opacity: 0.20 !important;
    pointer-events: none !important;
    cursor: default !important;
}

.fap-play-glyph-btn {
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s, opacity 0.15s;
}
.fap-play-glyph-btn:active {
    transform: scale(0.88);
    opacity: 0.7;
}

/* ─── Volume Capsule (iOS style) ─── */
.fap-volume-row {
    width: min(92vw, 750px);
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    margin-bottom: 12px;
    padding: 0 4px;
    box-sizing: border-box;
}
.fap-vol-icon {
    color: rgba(255, 255, 255, 0.5);
    flex-shrink: 0;
}
.fap-volume-capsule {
    flex: 1;
    height: 7px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.22);
    position: relative;
    cursor: pointer;
    touch-action: none;
    padding: 12px 0;
    background-clip: content-box;
}
.fap-volume-fill {
    height: 100%;
    border-radius: 4px;
    background: #ffffff;
    width: 50%;
    pointer-events: none;
    transition: width 0.04s ease-out;
}
.fap-vol-bubble {
    position: absolute;
    top: 50%;
    transform: translateY(-50%) translateX(-50%) scale(0);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    pointer-events: none;
    transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
    left: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.fap-vol-bubble.visible {
    transform: translateY(-50%) translateX(-50%) scale(1);
}

/* ─── Bluetooth Pill Button (Bottom Centered) ─── */
.fap-bottom-pill-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 14px;
    margin-bottom: 2px;
}
.fap-bt-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}
.fap-bt-pill:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.25);
}
.fap-bt-pill.connected {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.35);
}
.fap-bt-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}
.fap-bt-label {
    font-size: 0.80rem;
    font-weight: 600;
    letter-spacing: 0.2px;
}

/* Player modal in audio mode: hide extra overlays */
.frynzy-player-modal.mode-audio .frynzy-audio-view {
    display: flex !important;
}
.frynzy-player-modal.mode-video .frynzy-audio-view,
.frynzy-player-modal.mode-image .frynzy-audio-view {
    display: none !important;
}

/* ── YouTube Audio Track Settings & Onboarding ── */
.gfiles-audio-track-target-btn {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: rgba(239, 68, 68, 0.08);
    border: 1.5px solid rgba(239, 68, 68, 0.22);
    border-radius: 12px;
    font-size: 0.84rem;
    font-weight: 600;
    color: #ef4444;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    user-select: none;
    position: relative;
}
.gfiles-audio-track-target-btn:active {
    transform: scale(0.96);
    background: rgba(239, 68, 68, 0.16);
}

.gfiles-audio-track-highlight {
    animation: audioRowGlow 2s infinite alternate ease-in-out;
    border-radius: 16px;
    outline: 2px solid rgba(239, 68, 68, 0.4);
}
@keyframes audioRowGlow {
    0% {
        background: rgba(239, 68, 68, 0.04);
        box-shadow: 0 0 0 rgba(239, 68, 68, 0);
    }
    100% {
        background: rgba(239, 68, 68, 0.14);
        box-shadow: 0 0 18px rgba(239, 68, 68, 0.25);
    }
}

.gfiles-target-pulse-frame {
    animation: targetPulseFrame 1s infinite alternate ease-in-out !important;
    position: relative;
    z-index: 25;
}
@keyframes targetPulseFrame {
    0% {
        border-color: #ef4444;
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.8), inset 0 0 0 1px #ef4444;
        transform: scale(1);
    }
    100% {
        border-color: #b91c1c;
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0), inset 0 0 0 1.5px #b91c1c;
        transform: scale(1.06);
    }
}

.frynzy-audio-hand-pointer {
    position: absolute;
    right: 0;
    top: -42px;
    z-index: 9999;
    pointer-events: auto;
    cursor: pointer;
    line-height: 1;
    animation: handPointerBounceTop 0.8s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

.frynzy-hand-pointer-inner {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 20px;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.5), 0 0 0 2px #ffffff;
    white-space: nowrap;
    position: relative;
}

.frynzy-hand-pointer-inner::after {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 28px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #dc2626;
}

.frynzy-hand-icon {
    font-size: 1.1rem;
    color: #ffffff;
    display: inline-block;
    animation: handFingerTap 0.8s infinite alternate ease-in-out;
}

.frynzy-hand-emoji {
    font-size: 1.15rem;
    line-height: 1;
}

.frynzy-hand-text {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    letter-spacing: 0.2px;
}

@keyframes handPointerBounceTop {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-8px);
    }
}

@keyframes handFingerTap {
    0% {
        transform: rotate(0deg) scale(1);
    }
    100% {
        transform: rotate(15deg) scale(1.1);
    }
}

.frynzy-audio-opt-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
}
.frynzy-audio-opt-item:active {
    background: #e2e8f0;
}
.frynzy-audio-opt-item.selected {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.35);
}
.frynzy-audio-opt-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}
.frynzy-audio-opt-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    flex-shrink: 0;
}
.frynzy-audio-opt-text {
    flex: 1;
    min-width: 0;
}
.frynzy-audio-opt-title {
    font-weight: 600;
    font-size: 0.92rem;
    color: #0f172a;
    white-space: normal;
    word-break: break-word;
    line-height: 1.35;
}
.frynzy-audio-opt-sub {
    font-size: 0.76rem;
    color: #64748b;
    margin-top: 3px;
    white-space: normal;
    word-break: break-word;
    line-height: 1.35;
}
.frynzy-audio-opt-check {
    color: #ef4444;
    font-size: 1rem;
    font-weight: 700;
    margin-left: 8px;
    flex-shrink: 0;
}

body.dark-theme .frynzy-audio-track-dialog {
    background: #1e293b !important;
    color: #f8fafc !important;
}
body.dark-theme .frynzy-audio-opt-item {
    background: #0f172a !important;
    border-color: #334155 !important;
}
body.dark-theme .frynzy-audio-opt-title {
    color: #f8fafc !important;
}
body.dark-theme .frynzy-audio-opt-sub {
    color: #94a3b8 !important;
}
body.dark-theme #frynzyAudioTrackSearch {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}

/* ── YouTube Video Quality Settings ── */
.gfiles-video-quality-target-btn {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: rgba(37, 99, 235, 0.08);
    border: 1.5px solid rgba(37, 99, 235, 0.22);
    border-radius: 12px;
    font-size: 0.84rem;
    font-weight: 600;
    color: #2563eb;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    user-select: none;
    position: relative;
}
.gfiles-video-quality-target-btn:active {
    transform: scale(0.96);
    background: rgba(37, 99, 235, 0.16);
}

body.dark-theme .frynzy-video-quality-dialog {
    background: #1e293b !important;
    color: #f8fafc !important;
}

/* ══════════════════════════════════════════════════════════════════════
   SMARTPHONE PIN LOCK SVG ANIMATION (Safe Folder Onboarding & Settings)
   ══════════════════════════════════════════════════════════════════════ */
.frynzy-phone-pin-anim {
    width: 88px;
    height: 114px;
    margin: 0 auto 16px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 10px 20px rgba(15, 23, 42, 0.15));
}
.frynzy-phone-pin-anim.hero-size {
    width: 96px;
    height: 124px;
    margin: 0 auto 18px auto;
}
.phone-pin-svg {
    width: 100%;
    height: 100%;
}
.phone-shackle-anim {
    animation: phoneShackleBounce 3s ease-in-out infinite;
    transform-origin: 46px 36px;
}
@keyframes phoneShackleBounce {
    0%, 20%, 100% { transform: translateY(0); }
    10% { transform: translateY(-4px); }
}
.pin-dot {
    animation: pinDotFlash 3s infinite;
}
.pin-dot.pdot-1 { animation-delay: 0.2s; }
.pin-dot.pdot-2 { animation-delay: 0.5s; }
.pin-dot.pdot-3 { animation-delay: 0.8s; }
.pin-dot.pdot-4 { animation-delay: 1.1s; }

@keyframes pinDotFlash {
    0%, 100% { fill: #64748b; }
    25%, 75% { fill: #38bdf8; filter: drop-shadow(0 0 4px #38bdf8); }
}

/* Combination Lock / Security PIN icon for frynzyRowCreateKey */
.vault-icon-pin {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}
.pin-sub-stars {
    font-size: 0.58rem;
    font-weight: 800;
    line-height: 1;
    margin-top: 2px;
    color: #0f172a;
    letter-spacing: 1px;
}

/* ══════════════════════════════════════════════════════════════════════
   CARTOON TRASH PROGRESS MODAL & ANIMATIONS (Bugs 12, 15, 17, 23)
   ══════════════════════════════════════════════════════════════════════ */
.frynzy-trash-progress-card {
    background: #ffffff;
    border-radius: 28px;
    padding: 24px 20px 22px 20px;
    width: 90%;
    max-width: 360px;
    text-align: center;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.35);
    animation: frynzyPopIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.frynzy-cartoon-trash-stage {
    width: 100%;
    max-width: 220px;
    height: 140px;
    margin: 0 auto 12px auto;
}
.frynzy-cartoon-trash-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}
#cartoonThrowArm {
    transform-origin: 85px 105px;
    animation: cartoonArmThrow 1.8s ease-in-out infinite;
}
@keyframes cartoonArmThrow {
    0%, 100% { transform: rotate(0deg); }
    30% { transform: rotate(-25deg); }
    55% { transform: rotate(18deg); }
}
#cartoonTrashLid {
    transform-origin: 4px 28px;
    animation: cartoonLidBounce 1.8s ease-in-out infinite;
}
@keyframes cartoonLidBounce {
    0%, 100% { transform: rotate(0deg); }
    40% { transform: rotate(-38deg); }
    70% { transform: rotate(0deg); }
    75% { transform: rotate(-6deg); }
    80% { transform: rotate(0deg); }
}
.flying-file {
    animation: fileFlyIntoTrash 1.8s ease-in-out infinite;
}
.flying-file.file-1 {
    animation-delay: 0.1s;
}
.flying-file.file-2 {
    animation-delay: 0.4s;
}
.flying-file.file-3 {
    animation-delay: 0.7s;
}
@keyframes fileFlyIntoTrash {
    0% { opacity: 0; transform: translate(-30px, -20px) scale(0.6) rotate(-20deg); }
    35% { opacity: 1; transform: translate(0px, 0px) scale(1) rotate(0deg); }
    65% { opacity: 0.9; transform: translate(35px, 20px) scale(0.7) rotate(45deg); }
    85%, 100% { opacity: 0; transform: translate(45px, 45px) scale(0.2) rotate(90deg); }
}
.frynzy-trash-progress-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 6px 0;
}
.frynzy-trash-progress-subtitle {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0 0 16px 0;
}
.frynzy-trash-progress-bar-wrap {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 8px;
}
.frynzy-trash-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ef4444 0%, #f97316 100%);
    border-radius: 999px;
    transition: width 0.25s ease-out;
}
.frynzy-trash-progress-counter {
    font-size: 0.8rem;
    font-weight: 700;
    color: #475569;
}

/* Hinged Trash Can SVG in permanent delete dialog */
.hinged-trash-svg {
    overflow: visible;
}
.hinged-lid-anim {
    transform-origin: 35px 44px;
    animation: hingeLidCycle 2.2s cubic-bezier(0.34, 1.56, 0.64, 1) infinite;
}
@keyframes hingeLidCycle {
    0%, 100% { transform: rotate(0deg); }
    30%, 50% { transform: rotate(-50deg); }
    75% { transform: rotate(0deg); }
    82% { transform: rotate(-8deg); }
    90% { transform: rotate(0deg); }
}
.hinge-falling-item {
    animation: hingeItemFall 2.2s ease-in infinite;
}
.hinge-falling-item.item-a {
    animation-delay: 0.4s;
}
.hinge-falling-item.item-b {
    animation-delay: 0.8s;
}
@keyframes hingeItemFall {
    0% { opacity: 0; transform: translateY(-8px) scale(0.8); }
    40% { opacity: 1; transform: translateY(0px) scale(1); }
    70% { opacity: 0.8; transform: translateY(18px) scale(0.6); }
    90%, 100% { opacity: 0; transform: translateY(24px) scale(0.2); }
}

/* ══════════════════════════════════════════════════════════════════════

/* ==========================================================================
   MODULE 1-5: VIRTUAL SCROLLING, FLAT SECTIONS & INTERACTIVE FAST SCROLLER
   ========================================================================== */

.gfiles-cat-media-list.virtual-mode {
    position: relative !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    height: 100% !important;
    min-height: 200px !important;
}

.gfiles-virtual-spacer {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    pointer-events: none !important;
    z-index: 0 !important;
}

.gfiles-virtual-viewport {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    pointer-events: auto !important;
    z-index: 1 !important;
}

.gfiles-virtual-header {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 42px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 16px !important;
    box-sizing: border-box !important;
    font-weight: 700 !important;
    font-size: 0.92rem !important;
    color: #1e293b !important;
    background: #ffffff !important;
    user-select: none !important;
    z-index: 2 !important;
    cursor: pointer !important;
    contain: layout style paint !important;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.gfiles-virtual-grid-row {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 162px !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
    padding: 4px 12px !important;
    box-sizing: border-box !important;
    align-items: stretch !important;
    contain: layout style paint !important;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.gfiles-virtual-item-row {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 72px !important;
    padding: 4px 12px !important;
    box-sizing: border-box !important;
    contain: layout style paint !important;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Module 5: Interactive Fast Scroller - Ultra Fluid & Auto-Hide (2s) */
.gfiles-fast-scroller {
    position: absolute !important;
    top: 108px !important;
    right: 2px !important;
    bottom: 24px !important;
    width: 32px !important;
    z-index: 250 !important;
    pointer-events: none !important;
    touch-action: none !important;
    display: flex !important;
    justify-content: flex-end !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.28s !important;
    will-change: opacity, visibility !important;
}

.gfiles-fast-scroller.active.visible,
.gfiles-fast-scroller.active.dragging {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.gfiles-fast-scroll-thumb {
    position: absolute !important;
    top: 0 !important;
    right: 2px !important;
    width: 22px !important;
    height: 38px !important;
    border-radius: 12px !important;
    background: rgba(30, 41, 59, 0.88) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #ffffff !important;
    font-size: 11px !important;
    cursor: grab !important;
    pointer-events: auto !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35) !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    /* Zero transform transition for 100% instant sync with scrolling */
    transition: opacity 0.2s ease, background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease !important;
    will-change: transform !important;
    transform: translate3d(0, 0, 0);
    touch-action: none !important;
    user-select: none !important;
    -webkit-user-select: none !important;
}

.gfiles-fast-scroll-thumb:active,
.gfiles-fast-scroll-thumb.dragging {
    cursor: grabbing !important;
    background: #2563eb !important;
    border-color: rgba(255, 255, 255, 0.45) !important;
    box-shadow: 0 0 16px rgba(37, 99, 235, 0.75), 0 4px 14px rgba(0, 0, 0, 0.4) !important;
}

.gfiles-fast-scroll-bubble {
    position: absolute !important;
    right: 32px !important;
    top: 0 !important;
    transform: translateY(-50%) !important;
    background: #0f172a !important;
    color: #ffffff !important;
    padding: 6px 14px !important;
    border-radius: 20px !important;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    pointer-events: none !important;
    opacity: 1 !important;
    transition: opacity 0.2s ease !important;
    z-index: 260 !important;
}

.gfiles-fast-scroll-bubble.hidden {
    opacity: 0 !important;
}

/* Non-blocking Skeleton Loader */
.gfiles-cat-skeleton-wrap {
    display: flex;
    flex-direction: column;
    padding: 12px;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
}

.gfiles-cat-skeleton-header {
    width: 140px;
    height: 18px;
    border-radius: 6px;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: gfilesSkelPulse 1.4s ease-in-out infinite;
}

.gfiles-cat-skeleton-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.gfiles-cat-skeleton-card {
    height: 136px;
    border-radius: 10px;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: gfilesSkelPulse 1.4s ease-in-out infinite;
}

@keyframes gfilesSkelPulse {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}





/* Step panes inside the single persistent vault welcome dialog */
.frynzy-vault-step-pane {
    width: 100%;
    animation: frynzyStepFadeIn 0.22s ease-out;
}
@keyframes frynzyStepFadeIn {
    0% { opacity: 0; transform: translateY(4px); }
    100% { opacity: 1; transform: translateY(0); }
}


/* FRYNZY EQUALIZER OVERLAY — ALWAYS ABOVE AUDIO PLAYER MODAL */
.frynzy-eq-page,
#frynzyEqualizerPage {
    z-index: 10001150 !important;
}
body.player-modal-open .frynzy-eq-page,
body.player-modal-open #frynzyEqualizerPage {
    z-index: 10001160 !important;
}

/* Code Viewer & Editor: Non-wrap vs Wrap Mode Rules */
.frynzy-code-viewport:not(.wrap-mode) .frynzy-code-row {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    display: flex !important;
    flex-direction: row !important;
    height: 24px !important;
    min-height: 24px !important;
    max-height: 24px !important;
    line-height: 24px !important;
    align-items: center !important;
    min-width: 100% !important;
    width: max-content !important;
    box-sizing: border-box !important;
}

.frynzy-code-viewport.wrap-mode .frynzy-code-scroll-content {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 100% !important;
    overflow-x: hidden !important;
}
.frynzy-code-viewport.wrap-mode .frynzy-code-table {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
}
.frynzy-code-viewport.wrap-mode .frynzy-code-row {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    display: flex !important;
    flex-direction: row !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 24px !important;
    max-height: none !important;
    align-items: flex-start !important;
}
.frynzy-code-viewport.wrap-mode .frynzy-code-cell-num {
    height: auto !important;
    min-height: 24px !important;
    align-self: stretch !important;
    position: sticky !important;
    left: 0 !important;
    z-index: 10 !important;
}
.frynzy-code-viewport.wrap-mode .frynzy-code-cell-code {
    width: calc(100% - 56px) !important;
    min-width: 0 !important;
    max-width: calc(100% - 56px) !important;
    height: auto !important;
    min-height: 24px !important;
    max-height: none !important;
    line-height: 22px !important;
    white-space: pre-wrap !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    padding: 2px 16px 2px 12px !important;
}


/* ═════════════════════════════════════════════════════════════════════════
   3D REALISTIC METALLIC TRASH CAN & FALLING MEDIA BADGES
   ═════════════════════════════════════════════════════════════════════════ */
.trash-empty-3d-wrap {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px 16px 20px;
    width: 100%;
    margin: 0 auto;
}

.trash-dialog-3d-wrap {
    width: 100%;
    max-width: 240px;
    height: 180px;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background: radial-gradient(circle at 50% 30%, #ffffff 0%, #f8fafc 55%, #e2e8f0 100%);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 14px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(226, 232, 240, 0.9);
    overflow: hidden;
}

.trash-3d-canvas {
    display: block;
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.08));
}

.trash-empty-title {
    font-size: 1.18rem;
    font-weight: 800;
    color: #1e293b;
    margin-top: 14px;
    letter-spacing: -0.015em;
    text-align: center;
}

.trash-empty-subtitle {
    font-size: 0.88rem;
    font-weight: 500;
    color: #64748b;
    margin-top: 6px;
    text-align: center;
    max-width: 280px;
    line-height: 1.45;
}



/* ==========================================================================
   CARTOON 3D ANIMATION: PLACER DANS LA CORBEILLE (MODAL PROGRESS HEADER)
   ========================================================================== */
.frynzy-trash-cartoon-header {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 14px;
    padding: 6px 0;
    overflow: hidden;
    border-radius: 16px;
    background: radial-gradient(circle at 50% 30%, #ffffff 0%, #f1f5f9 60%, #e2e8f0 100%);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.04), 0 2px 10px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(226, 232, 240, 0.9);
}

.frynzy-trash-cartoon-canvas {
    display: block;
    width: 300px;
    height: 150px;
    border-radius: 12px;
}


/* ═══════════════════════════════════════════════════════════════
   TABLET RESPONSIVE — Audio Player (600px+)
   ═══════════════════════════════════════════════════════════════ */
@media (min-width: 600px) {
    /* Grand telephone portrait (600-767px) */
    .fap-artwork-card {
        width: min(86vw, 55vh);
        max-width: min(82vw, 700px);
        max-height: 55vh;
        border-radius: 28px;
    }
    .fap-artwork-img { border-radius: 28px; }
    .fap-ctrl-btn svg,
    .fap-ctrl-btn i { transform: scale(1.3); }
    .fap-play-glyph-btn svg { transform: scale(1.35); }
    .fap-volume-capsule { height: 9px; }
    .fap-eq-bars { height: 28px; gap: 4px; }
}

@media (min-width: 768px) and (orientation: portrait) {
    /* Tablette portrait */
    .fap-artwork-card {
        width: min(80vw, 54vh) !important;
        max-width: min(75vw, 800px) !important;
        max-height: 54vh !important;
        border-radius: 32px !important;
    }
    .fap-artwork-img { border-radius: 32px !important; }
    .fap-track-info-row {
        width: min(85vw, 800px) !important;
    }
    .fap-timeline-wrap {
        width: min(85vw, 800px) !important;
    }
    .fap-controls-row {
        width: min(85vw, 800px) !important;
    }
    .fap-volume-row {
        width: min(85vw, 800px) !important;
    }
}

@media (min-width: 1024px) and (orientation: portrait) {
    /* Grande tablette portrait (iPad Pro etc.) */
    .fap-artwork-card {
        width: min(70vw, 56vh) !important;
        max-width: min(68vw, 900px) !important;
        max-height: 56vh !important;
        border-radius: 36px !important;
    }
    .fap-artwork-img { border-radius: 36px !important; }
}

/* ── Tablet Landscape two-column layout (768px+ landscape) ── */
@media (min-width: 768px) and (orientation: landscape) {
    #frynzyAudioView,
    .frynzy-audio-view {
        flex-direction: row !important;
        align-items: flex-start !important;
        justify-content: center !important;
        gap: 40px !important;
        padding: 24px 32px !important;
    }
    .fap-artwork-card {
        width: min(46vw, 74vh) !important;
        max-width: min(44vw, 800px) !important;
        max-height: 78vh !important;
        flex-shrink: 0;
        margin: 0 !important;
        border-radius: 30px !important;
    }
    .fap-right-col {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        flex: 1;
        min-width: 0;
        padding-top: 8px;
    }
    .fap-track-info-row,
    .fap-lyrics-3lines-box,
    .fap-timeline-wrap,
    .fap-controls-row,
    .fap-volume-row {
        width: 100% !important;
    }
}

@keyframes gfilesPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.9; }
}


/* ==========================================================================
 * SECURE VAULT (DOSSIER SÉCURISÉ) Z-INDEX & INTERACTION ARCHITECTURE
 * ========================================================================== */
.frynzy-vault-fullscreen,
#frynzySecureFolderScreen,
#frynzySecureSettingsScreen {
    z-index: 10000900 !important;
}

#frynzySecurePrivacyShield {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: #ffffff !important;
    z-index: 10000950 !important;
    pointer-events: none;
}

.frynzy-vault-dialog-backdrop,
#frynzySecureUnlockModal,
#frynzySecureWelcomeModal,
#frynzyVaultProgressModal,
#frynzyVaultDeleteConfirmModal {
    z-index: 10001200 !important;
}

.frynzy-pin-btn {
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    cursor: pointer !important;
}


/* ==========================================================================
   FRYNZY FILES TAB — ULTRA-FLUID 120 FPS NATIVE GPU ACCELERATION
   Zero latency, hardware layer compositing, zero backdrop-filter stutter
   ========================================================================== */
#tabContentLecture {
    transform: translateZ(0) !important;
    -webkit-transform: translateZ(0) !important;
    will-change: scroll-position !important;
    contain: content !important;
    overscroll-behavior-y: contain !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-behavior: auto !important;
}

.lecture-screen-container,
.gfiles-lecture-container {
    contain: layout style !important;
    transform: translateZ(0) !important;
    -webkit-transform: translateZ(0) !important;
}

.gfiles-tile-card {
    contain: layout style !important;
    transform: translateZ(0) !important;
    -webkit-transform: translateZ(0) !important;
    will-change: auto !important;
}

.gfiles-recent-carousel {
    transform: translateZ(0) !important;
    -webkit-transform: translateZ(0) !important;
    contain: layout style !important;
}

.gfiles-recent-frame {
    transform: translateZ(0) !important;
    -webkit-transform: translateZ(0) !important;
    animation: none !important;
    opacity: 1 !important;
    contain: layout style paint !important;
}

.gfiles-recent-frame-play {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(0, 0, 0, 0.75) !important;
}



/* ============================================================
   CODE EDITOR ULTRA-FLUID SCROLLING & ANTI-FLICKER STABILIZER
   ============================================================ */
#frynzyCodeViewport,
.frynzy-code-viewport {
    overflow-anchor: none !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y pan-x !important;
    overscroll-behavior: contain !important;
    overscroll-behavior-y: contain !important;
    overscroll-behavior-x: contain !important;
}

#frynzyCodeScrollContent,
.frynzy-code-scroll-content,
#frynzyCodeTable,
.frynzy-code-table,
#frynzyCodeTopSpacer,
#frynzyCodeBottomSpacer,
#frynzyCodeRowsContainer,
.frynzy-code-row,
.frynzy-code-cell-code,
.frynzy-code-cell-num {
    overflow-anchor: none !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y pan-x !important;
    overflow-y: visible !important;
    overscroll-behavior: auto !important;
    overscroll-behavior-y: auto !important;
    overscroll-behavior-x: auto !important;
}

#frynzyCodeViewport::-webkit-scrollbar,
.frynzy-code-viewport::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none !important;
}

.frynzy-code-row {
    contain: layout paint !important;
    will-change: transform !important;
}

/* Search bar stabilization - eliminate slideDown layout shifts & flickering */
#frynzyCodeSearchbar,
.frynzy-code-searchbar {
    animation: none !important;
    transition: opacity 0.15s ease !important;
}

/* Fast scrollbar: zero lag, 2-second auto-hide & GPU tracking */
#frynzyCodeFastScrollbar,
.frynzy-code-fast-scrollbar {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.28s !important;
    will-change: opacity, visibility !important;
}

#frynzyCodeFastScrollbar.active.visible,
#frynzyCodeFastScrollbar.active.dragging,
.frynzy-code-fast-scrollbar.active.visible,
.frynzy-code-fast-scrollbar.active.dragging {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

#frynzyCodeFastThumb,
.frynzy-code-fast-thumb {
    will-change: transform !important;
    /* CRITICAL: NO transition on transform to eliminate lag while scrolling */
    transition: background 0.15s ease, box-shadow 0.15s ease !important;
}

#frynzyCodeFastThumb:active,
#frynzyCodeFastThumb.dragging,
.frynzy-code-fast-thumb:active,
.frynzy-code-fast-thumb.dragging {
    cursor: grabbing !important;
    background: #b4befe !important;
    /* Ensure no scale transform overrides translate3d */
    transform: none;
    box-shadow: 0 0 14px rgba(180, 190, 254, 0.8), 0 2px 10px rgba(0, 0, 0, 0.5) !important;
}

/* ADAPTIVE MOBILE HEIGHT-AWARE AUDIO PLAYER */
@media (max-height: 760px) {
    .fap-artwork-card {
        width: min(76vw, 34vh, 260px) !important;
        max-height: min(34vh, 260px) !important;
    }
    .fap-lyrics-3lines-box {
        min-height: 66px !important;
        height: 68px !important;
        margin: 3px auto !important;
    }
    .fap-track-info-row {
        margin-top: 4px !important;
        margin-bottom: 2px !important;
    }
}

@media (max-height: 660px) {
    .fap-artwork-card {
        width: min(68vw, 28vh, 210px) !important;
        max-height: min(28vh, 210px) !important;
    }
    .fap-lyrics-3lines-box {
        min-height: 62px !important;
        height: 64px !important;
        margin: 2px auto !important;
    }
    .fap-volume-row {
        margin: 2px 0 !important;
    }
}


/* ─── EXTENSION SELECTOR MODAL & CREATE FILE STYLING ─── */
#gfilesExtPickerModal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 10002040 !important;
    background: rgba(0, 0, 0, 0.5) !important;
    display: none;
    align-items: flex-end !important;
    justify-content: center !important;
    opacity: 0;
    transition: opacity 0.22s ease !important;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

#gfilesExtPickerModal.active {
    opacity: 1 !important;
}

.frynzy-ios-ext-sheet {
    background: #ffffff;
    border-radius: 24px 24px 0 0;
    width: 100%;
    max-width: 580px;
    margin: 0 auto;
    height: 78vh !important;
    max-height: 80vh !important;
    display: flex !important;
    flex-direction: column !important;
    box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.35);
    overflow: hidden !important;
    position: relative;
    padding-bottom: max(var(--sab-hw, 0px), env(safe-area-inset-bottom, 0px), 14px);
    transform: translate3d(0, 100%, 0) !important;
    transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1) !important;
    will-change: transform;
}

#gfilesExtPickerModal.active .frynzy-ios-ext-sheet {
    transform: translate3d(0, 0, 0) !important;
}

.gfiles-ext-tab-btn {
    padding: 7px 14px;
    border-radius: 18px;
    background: #e2e8f0;
    color: #475569;
    font-size: 0.8rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    min-width: max-content !important;
    display: inline-flex !important;
    align-items: center !important;
    transition: all 0.2s ease;
}

.gfiles-ext-tab-btn.active {
    background: #2563eb !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3) !important;
}

#gfilesExtCatTabs {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none;
}

#gfilesExtCatTabs::-webkit-scrollbar {
    display: none;
}

#gfilesExtListContainer {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
}

.gfiles-ext-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.gfiles-ext-row:hover,
.gfiles-ext-row:active {
    background: #f1f5f9;
    transform: translateY(-1px);
}

.gfiles-ext-row.selected {
    background: #eff6ff;
    border-color: #93c5fd;
}

.gfiles-ext-badge {
    padding: 6px 10px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 0.82rem;
    letter-spacing: 0.3px;
    min-width: 58px;
    text-align: center;
    flex-shrink: 0;
}

body.dark-theme .frynzy-ios-ext-sheet {
    background: #0f172a !important;
    color: #f8fafc !important;
}

body.dark-theme .frynzy-ext-sheet-handle {
    background: #475569 !important;
}

body.dark-theme .frynzy-ios-ext-sheet .frynzy-ext-sheet-header {
    border-bottom-color: #334155 !important;
}

body.dark-theme .frynzy-ios-ext-sheet .frynzy-ext-sheet-header button {
    background: #1e293b !important;
    color: #cbd5e1 !important;
}

body.dark-theme .frynzy-ios-ext-sheet div[style*="background:#f8fafc"] {
    background: #1e293b !important;
    border-color: #334155 !important;
}

body.dark-theme .frynzy-ios-ext-sheet input {
    background: #0f172a !important;
    color: #f8fafc !important;
    border-color: #334155 !important;
}

body.dark-theme .gfiles-ext-row {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}

body.dark-theme .gfiles-ext-row:hover,
body.dark-theme .gfiles-ext-row:active {
    background: #334155 !important;
}

body.dark-theme .gfiles-ext-row.selected {
    background: #1e3a8a !important;
    border-color: #3b82f6 !important;
}

body.dark-theme .gfiles-ext-tab-btn {
    background: #334155 !important;
    color: #cbd5e1 !important;
}

body.dark-theme .gfiles-ext-tab-btn.active {
    background: #2563eb !important;
    color: #ffffff !important;
}

body.dark-theme .gfiles-ext-tab-btn.active {
    background: #3b82f6 !important;
    color: #ffffff !important;
}


/* ========================================================================= */
/* FRYNZY FIRST-TIME VIDEO PLAYER ONBOARDING COACHMARK TUTORIAL              */
/* ========================================================================= */

.frynzy-video-coachmark-overlay {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 150 !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    overflow: hidden !important;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.28s ease;
}

.frynzy-coach-backdrop {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.48) !important;
    cursor: pointer !important;
}

/* Pulsing spotlight ring over active control button */
.frynzy-coach-spotlight {
    position: absolute !important;
    pointer-events: none !important;
    border: 2.5px solid #ffffff !important;
    box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.38), 0 0 28px rgba(255, 255, 255, 0.85) !important;
    animation: frynzyCoachSpotlightPulse 1.6s infinite ease-in-out !important;
    transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
    z-index: 10 !important;
    box-sizing: border-box !important;
}

@keyframes frynzyCoachSpotlightPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.4), 0 0 20px rgba(255, 255, 255, 0.8);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.6), 0 0 32px rgba(255, 255, 255, 1);
    }
}

/* Professional White Speech Bubble */
.frynzy-coach-bubble {
    position: absolute !important;
    background: #ffffff !important;
    color: #0f172a !important;
    width: calc(100% - 40px) !important;
    max-width: 340px !important;
    padding: 18px 20px 14px 20px !important;
    border-radius: 20px !important;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.65), 0 4px 14px rgba(0, 0, 0, 0.25) !important;
    box-sizing: border-box !important;
    pointer-events: auto !important;
    z-index: 20 !important;
    transition: top 0.28s cubic-bezier(0.16, 1, 0.3, 1), left 0.28s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s ease !important;
    animation: frynzyCoachBubbleFadeIn 0.26s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

@keyframes frynzyCoachBubbleFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.92);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.frynzy-bubble-arrow {
    position: absolute !important;
    width: 0 !important;
    height: 0 !important;
    border: 11px solid transparent !important;
    pointer-events: none !important;
}

.frynzy-bubble-arrow.arrow-down {
    bottom: -20px !important;
    left: 50%;
    transform: translateX(-50%);
    border-top-color: #ffffff !important;
}

.frynzy-bubble-arrow.arrow-up {
    top: -20px !important;
    left: 50%;
    transform: translateX(-50%);
    border-bottom-color: #ffffff !important;
}

.frynzy-bubble-header {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin-bottom: 8px !important;
}

.frynzy-bubble-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 3px 9px !important;
    background: #0284c7 !important;
    color: #ffffff !important;
    font-size: 0.76rem !important;
    font-weight: 700 !important;
    border-radius: 12px !important;
    letter-spacing: 0.4px !important;
    flex-shrink: 0 !important;
}

.frynzy-bubble-title {
    margin: 0 !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    line-height: 1.25 !important;
    letter-spacing: -0.2px !important;
}

.frynzy-bubble-desc {
    margin: 0 0 12px 0 !important;
    font-size: 0.88rem !important;
    line-height: 1.48 !important;
    color: #334155 !important;
    font-weight: 450 !important;
}

.frynzy-bubble-footer {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 6px !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    color: #0284c7 !important;
    border-top: 1px solid #f1f5f9 !important;
    padding-top: 10px !important;
}

/* Gesture Visual Guides */
.frynzy-coach-gesture-guide {
    position: absolute !important;
    top: 22% !important;
    left: 0 !important;
    right: 0 !important;
    display: none;
    justify-content: space-between !important;
    padding: 0 24px !important;
    pointer-events: none !important;
    z-index: 15 !important;
}

.frynzy-coach-guide-col {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 8px !important;
}

.frynzy-coach-pill {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    background: rgba(15, 23, 42, 0.88) !important;
    color: #ffffff !important;
    padding: 6px 14px !important;
    border-radius: 20px !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
}

.frynzy-coach-swipe-box {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 6px !important;
    color: #ffffff !important;
    font-size: 1.1rem !important;
    margin: 4px 0 !important;
}

.frynzy-coach-hand-vert {
    animation: frynzyCoachHandVert 1.4s infinite ease-in-out !important;
    font-size: 1.4rem !important;
    color: #38bdf8 !important;
}

@keyframes frynzyCoachHandVert {
    0%, 100% { transform: translateY(-8px); }
    50% { transform: translateY(8px); }
}

.frynzy-coach-sub {
    font-size: 0.72rem !important;
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500 !important;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8) !important;
}

/* Horizontal Swipe Guide */
.frynzy-coach-horiz-guide {
    position: absolute !important;
    top: 32% !important;
    left: 0 !important;
    right: 0 !important;
    display: none;
    flex-direction: column !important;
    align-items: center !important;
    gap: 10px !important;
    pointer-events: none !important;
    z-index: 15 !important;
}

.frynzy-coach-horiz-box {
    display: inline-flex !important;
    align-items: center !important;
    gap: 12px !important;
    background: rgba(15, 23, 42, 0.88) !important;
    color: #ffffff !important;
    padding: 8px 18px !important;
    border-radius: 24px !important;
    font-size: 0.86rem !important;
    font-weight: 600 !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    backdrop-filter: blur(8px) !important;
}

.frynzy-coach-hand-horiz {
    animation: frynzyCoachHandHoriz 1.4s infinite ease-in-out !important;
    font-size: 1.3rem !important;
    color: #38bdf8 !important;
}

@keyframes frynzyCoachHandHoriz {
    0%, 100% { transform: translateX(-10px); }
    50% { transform: translateX(10px); }
}

/* Downward Swipe Guide */
.frynzy-coach-down-guide {
    position: absolute !important;
    top: 80px !important;
    left: 0 !important;
    right: 0 !important;
    display: none;
    justify-content: center !important;
    pointer-events: none !important;
    z-index: 15 !important;
}

.frynzy-coach-down-box {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: rgba(15, 23, 42, 0.88) !important;
    color: #ffffff !important;
    padding: 6px 14px !important;
    border-radius: 20px !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    backdrop-filter: blur(8px) !important;
}

.frynzy-coach-arrow-down-anim {
    animation: frynzyCoachArrowDown 1.2s infinite ease-in-out !important;
    color: #38bdf8 !important;
}

@keyframes frynzyCoachArrowDown {
    0%, 100% { transform: translateY(-4px); }
    50% { transform: translateY(4px); }
}


/* ==========================================================================
   FRYNEX CONFIRMATION CHANGEMENT DE LANGUE MODAL (STYLE IPHONE BLANC PUR & VERRE DÉPOLI)
   ========================================================================== */
.frynzy-lang-confirm-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 10002500 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
}

.frynzy-lang-confirm-backdrop {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.45) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
}

.frynzy-lang-confirm-card {
    position: relative !important;
    width: 100% !important;
    max-width: 330px !important;
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 24px !important;
    padding: 26px 20px 22px !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(0, 0, 0, 0.04) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    animation: frynzyPopIn 0.24s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
    z-index: 2 !important;
    box-sizing: border-box !important;
}

@keyframes frynzyPopIn {
    from {
        opacity: 0;
        transform: scale(0.92);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.frynzy-lang-confirm-icon {
    width: 58px !important;
    height: 58px !important;
    border-radius: 50% !important;
    background: rgba(0, 122, 255, 0.1) !important;
    border: 1px solid rgba(0, 122, 255, 0.2) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 26px !important;
    color: #007aff !important;
    margin-bottom: 14px !important;
}

.frynzy-lang-confirm-title {
    font-size: 18.5px !important;
    font-weight: 700 !important;
    color: #111827 !important;
    margin-bottom: 8px !important;
    line-height: 1.25 !important;
    letter-spacing: -0.3px !important;
    white-space: nowrap !important;
}

.frynzy-lang-confirm-message {
    font-size: 13.5px !important;
    line-height: 1.45 !important;
    color: #4b5563 !important;
    margin-bottom: 22px !important;
    padding: 0 4px !important;
    text-align: center !important;
    word-break: normal !important;
}

.frynzy-lang-confirm-actions {
    display: flex !important;
    gap: 10px !important;
    width: 100% !important;
}

.frynzy-lang-confirm-btn {
    flex: 1 1 0% !important;
    height: 44px !important;
    border: none !important;
    outline: none !important;
    border-radius: 14px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    padding: 0 10px !important;
    box-sizing: border-box !important;
    transition: all 0.18s ease !important;
}

.frynzy-lang-confirm-btn span {
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
    overflow: hidden !important;
}

/* Boutons Verre Dépoli Style iPhone */
.frynzy-lang-confirm-btn.later {
    background: rgba(0, 0, 0, 0.05) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    color: #374151 !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
}

.frynzy-lang-confirm-btn.later:active {
    background: rgba(0, 0, 0, 0.1) !important;
    transform: scale(0.97) !important;
}

.frynzy-lang-confirm-btn.restart {
    background: rgba(0, 122, 255, 0.14) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    color: #007aff !important;
    border: 1px solid rgba(0, 122, 255, 0.3) !important;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.15) !important;
}

.frynzy-lang-confirm-btn.restart:active {
    background: rgba(0, 122, 255, 0.24) !important;
    transform: scale(0.97) !important;
}


/* ==========================================================================
   UNIVERSAL MULTI-LANGUAGE ANTI-COLLISION & LAYOUT STABILITY (NO PILE-ON-PILE)
   ========================================================================== */
.frynzy-ios-row-label,
.frynzy-player-song-title,
.frynzy-player-artist,
.frynzy-playlist-name,
.frynzy-playlist-info,
.frynzy-playlist-count,
.gfiles-sub-topbar-title,
.frynzy-ios-page-title,
.frynzy-bubble-title,
.frynzy-bubble-desc,
.frynzy-lang-name,
.frynzy-lang-native,
.frynzy-settings-card-title,
.frynzy-track-title,
.frynzy-track-artist {
    min-width: 0 !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
}

.frynzy-ios-row-label,
.frynzy-player-song-title,
.frynzy-player-artist,
.frynzy-playlist-name,
.gfiles-sub-topbar-title,
.frynzy-ios-page-title {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.frynzy-ios-row,
.frynzy-playlist-card,
.frynzy-playlist-info,
.frynzy-player-topbar,
.frynzy-bubble-header {
    min-width: 0 !important;
}

.frynzy-ios-row-icon,
.frynzy-ios-chevron,
.frynzy-ios-plus-btn,
.frynzy-bubble-badge,
.frynzy-player-topbar button,
.frynzy-ios-back-btn {
    flex-shrink: 0 !important;
}


/* ==========================================================================
   FRYNEX RTL NATIVE LAYOUT SUPPORT (ARABIC & HEBREW)
   ========================================================================== */
html[dir="rtl"],
body[dir="rtl"] {
    direction: rtl !important;
    text-align: right !important;
}

/* RTL Carousel & Navigation Coordinate Stability Fix (prevents blank screen on page/tab switch) */
[dir="rtl"] #frynzySwipeViewport,
[dir="rtl"] .frynzy-tabs-swipe-viewport,
[dir="rtl"] #frynzySwipeTrack,
[dir="rtl"] .frynzy-tabs-swipe-track,
[dir="rtl"] #frynzyBottomNav,
[dir="rtl"] .frynzy-tabs-nav,
[dir="rtl"] .frynzy-tab-dock {
    direction: ltr !important;
}

[dir="rtl"] .frynzy-tabs-swipe-track > .tab-screen {
    direction: rtl !important;
    text-align: right !important;
}

/* RTL sub-screen slide animations (slide from correct direction) */
[dir="rtl"] @keyframes dlSlideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}
[dir="rtl"] @keyframes trashSlideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}
[dir="rtl"] @keyframes gfilesSlideInRight {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

[dir="rtl"] .frynzy-player-topbar,
[dir="rtl"] .frynzy-ios-header,
[dir="rtl"] .lecture-header,
[dir="rtl"] .dl-dedicated-header,
[dir="rtl"] .trash-top-bar,
[dir="rtl"] .trash-sel-top-bar,
[dir="rtl"] .gfiles-sub-topbar,
[dir="rtl"] .frynzy-bubble-header {
    flex-direction: row-reverse !important;
}

/* Mirror navigation arrows in RTL */
[dir="rtl"] .frynzy-ios-back-btn i,
[dir="rtl"] .dl-dedicated-back-btn i,
[dir="rtl"] .gfiles-sub-back i,
[dir="rtl"] .fa-chevron-left,
[dir="rtl"] .fa-arrow-left,
[dir="rtl"] .fa-angle-left {
    transform: scaleX(-1) !important;
    display: inline-block;
}

[dir="rtl"] .frynzy-ios-chevron,
[dir="rtl"] .fa-chevron-right,
[dir="rtl"] .fa-arrow-right,
[dir="rtl"] .fa-angle-right {
    transform: scaleX(-1) !important;
    display: inline-block;
}

/* Rows, cards & list items in RTL */
[dir="rtl"] .frynzy-ios-row,
[dir="rtl"] .frynzy-playlist-card,
[dir="rtl"] .frynzy-track-item,
[dir="rtl"] .media-card-info {
    flex-direction: row-reverse !important;
    text-align: right !important;
}

[dir="rtl"] .frynzy-ios-row-label,
[dir="rtl"] .frynzy-player-song-title,
[dir="rtl"] .frynzy-player-artist,
[dir="rtl"] .frynzy-playlist-name,
[dir="rtl"] .frynzy-playlist-info,
[dir="rtl"] .frynzy-playlist-count,
[dir="rtl"] .gfiles-sub-topbar-title,
[dir="rtl"] .frynzy-ios-page-title,
[dir="rtl"] .frynzy-settings-card-title,
[dir="rtl"] .frynzy-track-title,
[dir="rtl"] .frynzy-track-artist {
    text-align: right !important;
}

[dir="rtl"] .frynzy-ios-row-icon {
    margin-left: 12px !important;
    margin-right: 0 !important;
}

[dir="rtl"] .frynzy-ios-chevron {
    margin-right: auto !important;
    margin-left: 0 !important;
}

[dir="rtl"] input[type="text"],
[dir="rtl"] input[type="search"],
[dir="rtl"] textarea {
    direction: rtl !important;
    text-align: right !important;
}

[dir="rtl"] .frynzy-coach-left-guide {
    right: 18px !important;
    left: auto !important;
}

[dir="rtl"] .frynzy-coach-right-guide {
    left: 18px !important;
    right: auto !important;
}


/* =========================================================================
   FRYNZY CODE EDITOR COLOR & GRADIENT PICKER MODAL
   ========================================================================= */
.frynzy-color-picker-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.72) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    z-index: 25000000 !important;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
}
.frynzy-color-picker-modal.active {
    display: flex !important;
}
.frynzy-cp-sheet {
    background: #18181b;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    width: 100%;
    max-width: 360px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
    color: #f4f4f5;
    animation: fcpFadeIn 0.12s ease-out !important;
    transform: none !important;
}
@keyframes fcpFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.frynzy-cp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.frynzy-cp-title {
    font-size: 1rem;
    font-weight: 800;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}
.frynzy-cp-close {
    background: transparent;
    border: none;
    color: #a1a1aa;
    font-size: 1.15rem;
    padding: 6px;
    cursor: pointer;
    border-radius: 8px;
}
.frynzy-cp-close:active {
    background: rgba(255,255,255,0.08);
}
.frynzy-cp-tabs {
    display: flex;
    padding: 10px 18px 4px;
    gap: 8px;
}
.frynzy-cp-tab-btn {
    flex: 1;
    padding: 8px 12px;
    border-radius: 10px;
    border: none;
    background: rgba(255, 255, 255, 0.06);
    color: #a1a1aa;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}
.frynzy-cp-tab-btn.active {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(37,99,235,0.35);
}
.frynzy-cp-body {
    padding: 14px 18px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.frynzy-cp-preview-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.35);
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.frynzy-cp-preview-swatch {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
    flex-shrink: 0;
}
.frynzy-cp-preview-text {
    flex: 1;
    font-family: 'JetBrains Mono', monospace, monospace;
    font-size: 0.82rem;
    font-weight: 600;
    color: #e4e4e7;
    word-break: break-all;
    line-height: 1.35;
}
.frynzy-cp-spectrum-wrap {
    position: relative;
    width: 100%;
    height: 130px;
    border-radius: 12px;
    overflow: hidden;
    cursor: crosshair;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12);
    touch-action: none;
}
.frynzy-cp-spectrum-canvas {
    width: 100%;
    height: 100%;
    display: block;
}
.frynzy-cp-spectrum-thumb {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 0 4px rgba(0,0,0,0.8);
    transform: translate(-50%, -50%);
    pointer-events: none;
    top: 50%; left: 50%;
}
.frynzy-cp-slider-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.frynzy-cp-slider-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #a1a1aa;
    width: 42px;
    flex-shrink: 0;
}
.frynzy-cp-hue-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 14px;
    border-radius: 7px;
    background: linear-gradient(to right, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
    outline: none;
    cursor: pointer;
}
.frynzy-cp-hue-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid rgba(0,0,0,0.3);
    box-shadow: 0 2px 6px rgba(0,0,0,0.5);
    cursor: pointer;
}
.frynzy-cp-palette-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 7px;
}
.frynzy-cp-chip {
    aspect-ratio: 1 / 1;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.2);
    transition: transform 0.12s ease;
}
.frynzy-cp-chip:active {
    transform: scale(1.22);
}
.frynzy-cp-gradient-presets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.frynzy-cp-grad-preset-card {
    height: 48px;
    border-radius: 10px;
    cursor: pointer;
    border: 1.5px solid rgba(255,255,255,0.18);
    display: flex;
    align-items: flex-end;
    padding: 4px 6px;
    box-sizing: border-box;
    transition: transform 0.12s ease;
}
.frynzy-cp-grad-preset-card:active {
    transform: scale(0.96);
}
.frynzy-cp-grad-preset-name {
    font-size: 0.65rem;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}
.frynzy-cp-grad-stops-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.frynzy-cp-stop-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(255,255,255,0.06);
    border: 1.5px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 700;
}
.frynzy-cp-stop-pill.active {
    border-color: #3b82f6;
    background: rgba(59,130,246,0.15);
}
.frynzy-cp-stop-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid #ffffff;
}
.frynzy-cp-footer {
    padding: 12px 18px 16px;
    display: flex;
    gap: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.frynzy-cp-btn-cancel {
    flex: 1;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.06);
    color: #d4d4d8;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
}
.frynzy-cp-btn-confirm {
    flex: 1.3;
    padding: 12px;
    border-radius: 12px;
    border: none;
    background: #2563eb;
    color: #ffffff;
    font-size: 0.92rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(37,99,235,0.4);
}
.frynzy-cp-btn-confirm:active {
    transform: scale(0.98);
}


/* ==========================================================================
   MASTER MODAL & LAYER STACKING STABILIZER (ANTIGRAVITY GUARANTEE)
   Fixes all background/buried modal and sheet issues across the entire APK.
   ========================================================================== */

/* 1. Category and dedicated screens (Layer 2) */
.gfiles-cat-screen,
#frynzyCategoryDetailScreen,
#frynzyAppsScreen,
.trash-dedicated-screen,
#trashDedicatedScreen,
.dl-dedicated-screen,
#dlDedicatedScreen {
    z-index: 10000050 !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FRYNEX BULLETPROOF PLAYLIST & LINKED PAGES HIERARCHY
   Chaque page et dialogue ouvert s'affiche toujours strictement au-dessus du précédent
   ═══════════════════════════════════════════════════════════════════════════ */
#frynzyPlaylistsPage {
    z-index: 10005000 !important;
}
#frynzyNewPlaylistPage {
    z-index: 10005100 !important;
}
#frynzyPlaylistSetupPage {
    z-index: 10009200 !important;
}
#frynzyImportMusicPage {
    z-index: 10009650 !important;
}
#frynzyIosPlayerModal {
    z-index: 10005000 !important;
}
#frynzyEqualizerPage,
.frynzy-eq-page {
    z-index: 10005500 !important;
}

/* 2. Media Player, Adult Player, Code Editor, PDF Viewer, Office Viewer & Games (ALWAYS IN FRONT OF PLAYLIST & EXPLORER) */
.frynzy-player-modal,
#frynzyPlayerModal,
#adultPlayerModal,
#frynzyPdfViewerModal,
.frynzy-code-editor-modal,
#frynzyCodeEditorModal,
#frynzyOfficeViewerModal,
.frynzy-office-viewer-modal,
#frynzySkyFighterOverlay,
.frynzy-sky-fighter-container,
#frynzyGamesHubModal,
#frynzyGamesHubOverlay,
.frynzy-games-hub-container,
#frynzyMemoryGameOverlay,
#frynzyMemoryOverlay,
.frynzy-memory-game-container {
    z-index: 10007000 !important;
}

/* 3. In-Player Fullscreen Extensions (Layer 5) */
.frynzy-lyrics-modal,
#frynzyLyricsModal {
    z-index: 10007100 !important;
}

.frynzy-eq-page,
#frynzyEqualizerPage,
body.player-modal-open .frynzy-eq-page,
body.player-modal-open #frynzyEqualizerPage {
    z-index: 10007120 !important;
}

#frynzyPlaybackSpeedBackdrop,
#frynzyAudioTrackModal,
#frynzyAudioSpeedModal,
#frynzyVideoQualityModal {
    z-index: 10007150 !important;
}

#frynzyPlaybackSpeedSheet,
#frynzySpeedSheet {
    z-index: 10003160 !important;
}

#frynzyPlayerOptionsMenu,
#frynzyPlayerMenuDropdown {
    z-index: 10003180 !important;
}

.frynzy-lyrics-sheet-backdrop,
#frynzyLyricsOptionsModal,
#frynzyLyricsEditSheet,
#frynzyLyricsOffsetModal,
#frynzyLyricsDesyncModal,
#frynzyLyricsMismatchModal,
#frynzyLyricsIncompleteModal,
#frynzyLyricsPronounceModal,
#frynzyLyricsTranslateModal,
#frynzyLyricsFeedbackSheet {
    z-index: 10003200 !important;
}

.frynzy-lyrics-toast {
    z-index: 10003250 !important;
}

/* 4. Storage Explorer & File Mover (Layer 3 - UNDER ACTIVE PLAYERS & EDITORS) */
#frynzyStorageExplorerModal,
.gfiles-explorer-modal,
#frynzyFileMoverModal,
body.player-modal-open #frynzyStorageExplorerModal,
body.player-modal-open .gfiles-explorer-modal,
body.player-modal-open #frynzyFileMoverModal,
body.code-editor-open #frynzyStorageExplorerModal,
body.code-editor-open .gfiles-explorer-modal,
body.code-editor-open #frynzyFileMoverModal {
    z-index: 10001000 !important;
    opacity: 1 !important;
}

/* 5. Explorer Sub-Sheets & Dialogs (Layer 6) */
#gfilesVolumeSheetBackdrop,
#gfilesSortSheetBackdrop,
#gfilesStorageFilterSheetBackdrop,
#gfilesCatSortSheetBackdrop,
#gfilesSearchSortSheetBackdrop,
#gfilesSearchStorageSheetBackdrop,
#gfilesSearchCatSheetBackdrop,
body.player-modal-open #gfilesVolumeSheetBackdrop,
body.player-modal-open #gfilesSortSheetBackdrop,
body.player-modal-open #gfilesStorageFilterSheetBackdrop,
body.player-modal-open .gfiles-sheet-backdrop {
    z-index: 10002010 !important;
}

#gfilesVolumeSheet,
#gfilesSortSheet,
#gfilesStorageFilterSheet,
#gfilesCatSortSheet,
#gfilesSearchSortSheet,
#gfilesSearchStorageSheet,
#gfilesSearchCatSheet,
.gfiles-bottom-sheet,
body.player-modal-open #gfilesVolumeSheet,
body.player-modal-open #gfilesSortSheet,
body.player-modal-open #gfilesStorageFilterSheet,
body.player-modal-open .gfiles-bottom-sheet {
    z-index: 10002020 !important;
}

#gfilesNewFolderBackdrop,
#gfilesNewFileBackdrop,
.frynzy-new-folder-backdrop,
#frynzyNewFolderBackdrop,
body.player-modal-open #gfilesNewFolderBackdrop,
body.player-modal-open .frynzy-new-folder-backdrop,
body.player-modal-open #frynzyNewFolderBackdrop {
    z-index: 10002030 !important;
}

#gfilesNewFolderModal,
#frynzyNewFolderDialog,
body.player-modal-open #gfilesNewFolderModal,
body.player-modal-open #frynzyNewFolderDialog {
    z-index: 10002035 !important;
}

#gfilesExtPickerModal,
body.player-modal-open #gfilesExtPickerModal {
    z-index: 10002040 !important;
}

#gfilesSelectionMenuBackdrop,
#gfilesCatMenuBackdrop,
#gfilesCatSelMenuBackdrop,
#gfilesAppsMenuBackdrop,
#gfilesAppItemMenuBackdrop,
#frynzyVaultMenuBackdrop,
body.player-modal-open #gfilesCatMenuBackdrop,
body.player-modal-open #gfilesCatSelMenuBackdrop,
body.player-modal-open #gfilesAppsMenuBackdrop,
body.player-modal-open #gfilesAppItemMenuBackdrop {
    z-index: 10002045 !important;
}

#gfilesSelectionMenu,
#gfilesNormalOptionsMenu,
#gfilesCatMenuPopup,
#gfilesCatSelMenuPopup,
#gfilesAppsMenuPopup,
#gfilesAppItemMenuPopup,
.gfiles-dropdown-popup,
.frynzy-ios-glass-menu,
#frynzyVaultMenuPopup,
#frynzyCodeMenuPopup {
    z-index: 10002050 !important;
}

#frynzyPickerActionBar,
.trash-action-bottombar,
#trashActionBottomBar {
    z-index: 10002060 !important;
}

/* 6. High-Priority Action Dialogs, Progress, File Info, Share Sheets (Layer 7) */
#frynzyShareChoiceSheet,
#frynzyUniversalShareSheet,
body.player-modal-open #frynzyShareChoiceSheet,
body.player-modal-open #frynzyUniversalShareSheet,
#frynzyShareChoiceSheet,
#frynzyUniversalShareSheet,
.fyshare-choice-sheet-backdrop {
    z-index: 2147483647 !important;
    position: fixed !important;
}

.gfiles-dialog-backdrop,
.gfiles-dialog-backdrop.active,
#gfilesMoveProgressBackdrop,
#gfilesDeleteProgressBackdrop,
#gfilesCompressProgressBackdrop,
#frynzyMoveToTrashProgressModal,
body.player-modal-open .gfiles-dialog-backdrop,
body.player-modal-open #gfilesMoveProgressBackdrop,
body.player-modal-open #gfilesDeleteProgressBackdrop {
    z-index: 10002110 !important;
}

.gfiles-dialog-card,
.gfiles-dialog-backdrop .gfiles-dialog-card,
body.player-modal-open .gfiles-dialog-card {
    z-index: 10002111 !important;
}

#frynzyFileInfoDialogBackdrop,
#frynzyFileInfoDialogBackdrop.active,
body.player-modal-open #frynzyFileInfoDialogBackdrop {
    z-index: 10009500 !important;
}

#frynzyFileInfoDialogBackdrop .gfiles-dialog-card,
body.player-modal-open #frynzyFileInfoDialogBackdrop .gfiles-dialog-card {
    z-index: 10009501 !important;
}

.frynzy-ios-crystal-backdrop,
#frynzyIosCompressModal,
#frynzyPermanentDeleteModal,
#frynzyIosDeleteModal,
#gfilesDeleteConfirmModal,
#frynzyZipConfirmDialog,
.trash-delete-dialog,
#trashDeleteDialogBackdrop,
#trashMoveBottomSheet,
#trashMoveSheetBackdrop,
#trashRestoreBottomSheet,
#trashRestoreSheetBackdrop {
    z-index: 10002130 !important;
}

/* 7. Safe Folder / Vault Dialogs & Password Screens (Layer 8) */
#frynzySecureWelcomeModal,
#frynzySecureUnlockModal,
.frynzy-vault-dialog-backdrop,
.frynzy-secure-modal,
#frynzyVaultDeleteConfirmModal,
#frynzyVaultProgressModal,
#frynzyEditorSecurityVerifyModal,
#frynzyEditorLockTypeModal,
#frynzyEditorPinModal,
body.player-modal-open #frynzySecureWelcomeModal,
body.player-modal-open #frynzySecureUnlockModal,
body.player-modal-open .frynzy-vault-dialog-backdrop,
body.player-modal-open .frynzy-secure-modal,
body.player-modal-open #frynzyVaultDeleteConfirmModal,
body.player-modal-open #frynzyVaultProgressModal {
    z-index: 10002200 !important;
    opacity: 1 !important;
}

/* 8. Interactive Color Picker Modal in Code Editor (Layer 9 - ALWAYS IN FRONT OF CODE EDITOR) */
#frynzyColorPickerModal,
.frynzy-color-picker-modal {
    z-index: 10005000 !important;
    opacity: 1 !important;
}


/* Enhanced Sub-Screen & Sub-Page Stacking */
.gfiles-sub-screen,
[id*="SubScreen"],
[id*="DetailScreen"] {
    z-index: 10000060 !important;
}

/* Overridden by bulletproof hierarchy above */

.frynzy-acc-page,
.frynzy-biz-page,
.fcp-screen {
    z-index: 10000050 !important;
}

.fcp-process-screen,
#fcpProcessDedicatedScreen {
    z-index: 10002000 !important;
}

.frynzy-crystal-modal-backdrop,
.frynzy-crystal-modal-backdrop.active,
#frynzyLimitSheet,
#frynzyCustomCounterModal,
#frynzyFolderSelectSheet,
#frynzyFolderExcessLimitModal,
#frynzyReorderActionSheet,
#frynzyPlaylistProToolsSheet,
#frynzyPlaylistStatsDialog,
#frynzyCustomRankDialog,
#frynzyPlaylistSelectSheet,
#frynzyHeureLectureModal,
#frynzyHeurePauseModal,
.coll-picker-overlay,
.ios-see-more-modal,
.mobile-action-overlay {
    z-index: 10005600 !important;
}

.frynzy-setup-batch-dropdown,
#frynzyImportBatchMenu,
#frynzyPlayerMenuDropdown {
    z-index: 10005700 !important;
}

#frynzyTutorialOverlay,
.frynzy-animated-hand {
    z-index: 10005800 !important;
}

.adult-player-modal,
#adultPlayerModal {
    z-index: 10001000 !important;
}



/* All Player & File Explorer Sheets / Dialogs / Popups ALWAYS on top of pages */
.gfiles-sheet-backdrop,
.gfiles-dialog-backdrop,
.iphone-glass-backdrop,
#frynzyPlaybackSpeedBackdrop,
#frynzyAudioTrackModal,
#frynzyAudioSpeedModal,
#frynzyVideoQualityModal,
#frynzyStorageConfirmModal,
#frynzyStorageLowSpaceModal,
#frynzyFileInfoDialogBackdrop,
#frynzyIosCompressModal,
#frynzyIosDeleteModal {
    z-index: 10005000 !important;
}

/* =========================================================================
   FRYNEX ULTIMATE DARK THEME & UI STYLING SPECIFICATION (USER DIRECTIVE MATCH)
   ========================================================================= */

/* 1. CIRCULAR VEIL THEME TRANSITION OVERLAY */
#frynexThemeTransitionVeil {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: #000000 !important;
    z-index: 10010999 !important;
    pointer-events: none !important;
}

/* 2. ABSOLUTELY ALL PAGES IN PURE OLED BLACK */
body.dark-theme,
body.dark-theme html,
body.dark-theme #app,
body.dark-theme #frynzyApp,
body.dark-theme .main-container,
body.dark-theme .frynzy-tabs-swipe-viewport,
body.dark-theme .frynzy-tabs-swipe-track,
body.dark-theme .tab-screen,
body.dark-theme #tabContentSearch,
body.dark-theme #tabContentLecture,
body.dark-theme #tabContentProfile,
body.dark-theme #tabContentDownloads,
body.dark-theme .lecture-screen-container,
body.dark-theme .gfiles-lecture-container,
body.dark-theme .gfiles-cat-screen,
body.dark-theme #frynzyAppsScreen,
body.dark-theme #frynzyCategoryDetailScreen,
body.dark-theme .trash-dedicated-screen,
body.dark-theme #trashDedicatedScreen,
body.dark-theme .dl-dedicated-screen,
body.dark-theme #dlDedicatedScreen,
body.dark-theme .frynzy-vault-fullscreen,
body.dark-theme #frynzySecureFolderScreen,
body.dark-theme .gfiles-settings-page,
body.dark-theme #frynzyStorageExplorerModal,
body.dark-theme .gfiles-explorer-modal,
body.dark-theme #frynzyEqualizerPage,
body.dark-theme .frynzy-eq-page,
body.dark-theme #frynzyBusinessScreen,
body.dark-theme .frynzy-business-screen,
body.dark-theme #frynzyInstagramPage,
body.dark-theme #frynzyYoutubePage,
body.dark-theme #frynzyStorageChooserScreen,
body.dark-theme #frynzySettingsAudioScreen,
body.dark-theme #frynzySettingsEditorScreen,
body.dark-theme #frynzySettingsFyShareScreen,
body.dark-theme #frynzySettingsNotificationsScreen,
body.dark-theme #frynzySettingsVideoScreen,
body.dark-theme #frynzyGamingHub,
body.dark-theme #gfilesSearchScreen {
    background: #000000 !important;
    color: #f1f5f9;
}

/* 3. TOP HEADER (MENU HAMBURGER, SEARCH BAR & FY SHARE QUICK BUTTON) */
body.dark-theme #mobileTopBar,
body.dark-theme .mobile-top-bar {
    background: #000000 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* Menu hamburger icon in exact inactive tab bar gray */
body.dark-theme .mobile-hamburger-btn span,
body.dark-theme #mobileHamburgerBtn span {
    background: rgba(255, 255, 255, 0.65) !important;
}
body.dark-theme .mobile-hamburger-btn i,
body.dark-theme #mobileHamburgerBtn i {
    color: rgba(255, 255, 255, 0.65) !important;
}

/* Search bar pill with identical glassmorphism to bottom tab dock */
body.dark-theme .gfiles-top-searchbar,
body.dark-theme #gfilesTopSearchBar {
    background: rgba(26, 26, 32, 0.76) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    box-shadow: 0 10px 34px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.25) !important;
    border-radius: 28px !important;
}

/* Search bar text in light gray / near-white */
body.dark-theme .gfiles-top-search-text,
body.dark-theme #gfilesTopSearchBar .gfiles-top-search-text {
    color: #f1f5f9 !important;
    font-weight: 500 !important;
}

/* Search bar magnifying glass icon in inactive tab gray */
body.dark-theme .gfiles-top-search-icon,
body.dark-theme #gfilesTopSearchBar .gfiles-top-search-icon,
body.dark-theme #gfilesTopSearchBar i {
    color: rgba(255, 255, 255, 0.65) !important;
}

/* Fy Share top button with identical glassmorphism to tab dock & gray icon */
body.dark-theme .mobile-top-fyshare-btn {
    background: rgba(26, 26, 32, 0.76) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    box-shadow: 0 10px 34px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.25) !important;
    border-radius: 50% !important;
}
body.dark-theme .mobile-top-fyshare-btn i {
    color: rgba(255, 255, 255, 0.65) !important;
}

/* 4. CATEGORIES, COLLECTIONS & TOTAL STORAGE CARDS (MATCH DRAWER MENU IN IMAGE 1) */
body.dark-theme .gfiles-tile-card,
body.dark-theme .gfiles-collection-card,
body.dark-theme .gfiles-storage-card,
body.dark-theme #catCardJeux,
body.dark-theme #storageCardSd {
    background: rgba(255, 255, 255, 0.76) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.98) !important;
    border-radius: 18px !important;
    backdrop-filter: blur(30px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(30px) saturate(180%) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04), inset 0 1px 2px rgba(255, 255, 255, 1) !important;
}

body.dark-theme .gfiles-tile-card:active,
body.dark-theme .gfiles-collection-card:active,
body.dark-theme .gfiles-storage-card:active {
    background: rgba(240, 242, 247, 0.92) !important;
    transform: scale(0.98) !important;
}

/* Tile Icon Box: Crystal Glass container, NO square drop shadow artifacts! */
.gfiles-tile-icon,
.gfiles-tile-card .gfiles-tile-icon,
.gfiles-tile-card:nth-child(n) .gfiles-tile-icon,
body.dark-theme .gfiles-tile-icon,
body.dark-theme .gfiles-tile-card .gfiles-tile-icon,
body.dark-theme .gfiles-tile-card:nth-child(n) .gfiles-tile-icon,
body.dark-theme .gfiles-collection-card .gfiles-collection-icon,
body.dark-theme .gfiles-storage-card .gfiles-storage-icon,
body.dark-theme #catCardJeux .gfiles-tile-icon {
    width: 38px !important;
    height: 38px !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.65) !important;
    backdrop-filter: blur(14px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(14px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.7) !important;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.85), 0 3px 8px rgba(0, 0, 0, 0.07) !important;
    color: #64748b !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    filter: none !important;
    -webkit-filter: none !important;
}

.gfiles-tile-icon i,
.gfiles-tile-icon svg,
.gfiles-tile-card .gfiles-tile-icon i,
.gfiles-tile-card .gfiles-tile-icon svg,
.gfiles-tile-card:nth-child(n) .gfiles-tile-icon i,
.gfiles-tile-card:nth-child(n) .gfiles-tile-icon svg,
body.dark-theme .gfiles-tile-icon i,
body.dark-theme .gfiles-tile-icon svg,
body.dark-theme .gfiles-tile-card .gfiles-tile-icon i,
body.dark-theme .gfiles-tile-card .gfiles-tile-icon svg,
body.dark-theme .gfiles-tile-card:nth-child(n) .gfiles-tile-icon i,
body.dark-theme .gfiles-tile-card:nth-child(n) .gfiles-tile-icon svg,
body.dark-theme .gfiles-collection-card i,
body.dark-theme .gfiles-storage-card i,
body.dark-theme #catCardJeux .gfiles-tile-icon i {
    color: #64748b !important;
    fill: #64748b !important;
    font-size: 1.05rem !important;
}

/* Card titles and subtitles */
body.dark-theme .gfiles-tile-name,
body.dark-theme .gfiles-collection-title,
body.dark-theme .gfiles-storage-title {
    color: #111827 !important;
    font-weight: 700 !important;
}

body.dark-theme .gfiles-tile-sub,
body.dark-theme .gfiles-storage-sub {
    color: #64748b !important;
    font-size: 0.8rem !important;
}

/* 5. TITLES IN WHITE & BLUE ACCENTS PRESERVED */
body.dark-theme .gfiles-section-title,
body.dark-theme .gfiles-section-header,
body.dark-theme .gfiles-recent-title,
body.dark-theme .trash-header-title,
body.dark-theme .trash-top-title,
body.dark-theme .dl-dedicated-title,
body.dark-theme #gfilesCatHeaderTitle,
body.dark-theme .gfiles-cat-title,
body.dark-theme .frynzy-eq-page-title,
body.dark-theme .gfiles-setting-title,
body.dark-theme .media-date-header,
body.dark-theme .gfiles-group-title,
body.dark-theme .gfiles-date-title,
body.dark-theme .gfiles-exp-title,
body.dark-theme .frynzy-biz-header-title,
body.dark-theme .frynzy-header-title,
body.dark-theme .frynzy-page-title,
body.dark-theme h1,
body.dark-theme h2,
body.dark-theme h3,
body.dark-theme .settings-title,
body.dark-theme .fcp-header-title,
body.dark-theme .fyshare-title {
    color: #ffffff !important;
}

/* Blue text preservation */
body.dark-theme .gfiles-section-link,
body.dark-theme a.blue-link,
body.dark-theme .text-blue,
body.dark-theme .gfiles-section-link:active,
body.dark-theme .frynex-policy-legal-link,
body.dark-theme .frynzy-link-blue,
body.dark-theme .gfiles-breadcrumb-segment.active {
    color: #2563eb !important;
}

/* Secondary header icons/buttons in light gray */
body.dark-theme .gfiles-add-collection-btn,
body.dark-theme .gfiles-section-dots-btn,
body.dark-theme .gfiles-cat-btn,
body.dark-theme .frynzy-eq-nav-btn,
body.dark-theme .gfiles-chevron,
body.dark-theme .gfiles-back-btn,
body.dark-theme .gfiles-top-back-btn,
body.dark-theme .gfiles-view-mode-btn,
body.dark-theme .frynzy-nav-back,
body.dark-theme .header-back-btn i,
body.dark-theme .fcp-back-btn i {
    color: #cbd5e1 !important;
}

/* 6. CATEGORY DETAILS SCREEN (IMAGE 3) */
body.dark-theme #gfilesCatNormalTopbar,
body.dark-theme .gfiles-cat-topbar {
    background: #000000 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

body.dark-theme .gfiles-cat-chips-scroll {
    background: #000000 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

body.dark-theme .gfiles-cat-chip,
body.dark-theme .gfiles-chip {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #cbd5e1 !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

body.dark-theme .gfiles-cat-chip.active,
body.dark-theme .gfiles-chip.active {
    background: #2563eb !important;
    color: #ffffff !important;
    border-color: #2563eb !important;
}

body.dark-theme .gfiles-cat-media-list,
body.dark-theme #gfilesCatMediaContainer {
    background: #000000 !important;
}

body.dark-theme .gfiles-media-card {
    background: #111116 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

body.dark-theme .gfiles-media-card .gfiles-media-title {
    color: #ffffff !important;
}

body.dark-theme .gfiles-media-card .gfiles-media-sub {
    color: #94a3b8 !important;
}

body.dark-theme .gfiles-media-card .gfiles-media-duration {
    background: rgba(0, 0, 0, 0.75) !important;
    color: #ffffff !important;
}

/* 7. EQUALIZER FULLSCREEN PAGE */
body.dark-theme #frynzyEqualizerPage,
body.dark-theme .frynzy-eq-page {
    background: #000000 !important;
}

body.dark-theme .frynzy-eq-topbar {
    background: #000000 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

body.dark-theme .frynzy-eq-page-title {
    color: #ffffff !important;
}

body.dark-theme .frynzy-eq-nav-btn {
    color: #ffffff !important;
}

body.dark-theme .frynzy-eq-canvas-wrap {
    background: #000000 !important;
}

body.dark-theme .frynzy-eq-canvas {
    background: #09090f !important;
}

body.dark-theme .frynzy-eq-presets-label {
    background: #000000 !important;
    color: #94a3b8 !important;
}

body.dark-theme .frynzy-eq-presets-row {
    background: #000000 !important;
}

body.dark-theme .frynzy-eq-preset-btn {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #e2e8f0 !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

body.dark-theme .frynzy-eq-preset-btn.active {
    background: #2563eb !important;
    color: #ffffff !important;
    border-color: #2563eb !important;
}

body.dark-theme .frynzy-eq-info-note {
    background: #000000 !important;
    color: #94a3b8 !important;
}

/* 8. SETTINGS & PROFILE PAGE IN DARK THEME */
body.dark-theme .gfiles-settings-page {
    background: #000000 !important;
}

body.dark-theme .gfiles-setting-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

body.dark-theme .gfiles-setting-title {
    color: #ffffff !important;
}

body.dark-theme .gfiles-setting-sub {
    color: #94a3b8 !important;
}

/* 9. RECENT CAROUSEL IN DARK THEME */
body.dark-theme .gfiles-recent-frame {
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
}
body.dark-theme .gfiles-recent-frame-title {
    color: #ffffff !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FRYNEX ULTIMATE PLAYLIST MODALS & REFINED DARK THEME STYLING
   ═══════════════════════════════════════════════════════════════════════════ */

/* 1. PLAYLIST SETUP & RINGTONE MODAL Z-INDEX (ALWAYS IN FRONT OF PLAYLIST PAGE) */
#frynzyPlaylistSetupPage,
#frynzyPlaylistSetupPage.active {
    z-index: 10009200 !important;
}

#frynzyImportMusicPage,
#frynzyImportMusicPage.active {
    z-index: 10009650 !important;
}

#frynzyRingtoneActionModal,
.frynzy-ringtone-modal {
    z-index: 10009900 !important;
}

#frynzyAlarmConfigModal,
#frynzyHeurePauseModal,
#frynzyHeureLectureModal,
#frynzyMinuterieModal,
#frynzyCustomCounterModal {
    z-index: 10009900 !important;
}

/* 2. RECENT MEDIA CAROUSEL IN DARK THEME (PURE BLACK & SLEEK BORDER) */
body.dark-theme .gfiles-recent-carousel,
body.dark-theme #gfilesRecentCarousel {
    background: transparent !important;
}

body.dark-theme .gfiles-recent-frame,
body.dark-theme .gfiles-recent-card,
body.dark-theme .gfiles-hero-card,
body.dark-theme .gfiles-recent-carousel-item {
    background: #000000 !important;
    border: 1.5px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 16px !important;
    box-shadow: none !important;
}

body.dark-theme .gfiles-recent-frame-title,
body.dark-theme .gfiles-recent-card-title,
body.dark-theme .gfiles-hero-title,
body.dark-theme .gfiles-recent-title-txt {
    color: #ffffff !important;
}

body.dark-theme .gfiles-recent-frame-sub,
body.dark-theme .gfiles-recent-card-sub,
body.dark-theme .gfiles-hero-sub {
    color: #94a3b8 !important;
}

body.dark-theme .gfiles-recent-frame-play {
    background: rgba(0, 0, 0, 0.7) !important;
    color: #ffffff !important;
}

/* 3. CATEGORY FOLDERS BAR: IPHONE DOCK GLASSMORPHISM STYLE & ACTIVE WHITE CHIP */
body.dark-theme #gfilesCatChipsScroll,
body.dark-theme .gfiles-chips-scroll,
body.dark-theme .gfiles-cat-chips-scroll {
    background: rgba(26, 26, 32, 0.76) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    box-shadow: 0 10px 34px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.25) !important;
    border-radius: 34px !important;
    padding: 4px 6px !important;
    margin: 10px 14px 12px 14px !important;
    gap: 4px !important;
    display: flex !important;
    align-items: center !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    width: auto !important;
    box-sizing: border-box !important;
}

body.dark-theme #gfilesCatChipsScroll::-webkit-scrollbar,
body.dark-theme .gfiles-chips-scroll::-webkit-scrollbar {
    display: none !important;
}

/* Inactive folder chips in dock gray */
body.dark-theme .gfiles-cat-chip,
body.dark-theme .gfiles-chip,
body.dark-theme .gfiles-cat-chip:not(.active),
body.dark-theme .gfiles-chip:not(.active) {
    background: transparent !important;
    border: none !important;
    color: rgba(255, 255, 255, 0.65) !important;
    font-weight: 600 !important;
    font-size: 0.88rem !important;
    padding: 7px 15px !important;
    border-radius: 22px !important;
    box-shadow: none !important;
    white-space: nowrap !important;
    transition: color 0.18s ease, background 0.18s ease !important;
}

/* Active folder chip ("Tous" or selected current folder) in WHITE active pill */
body.dark-theme .gfiles-cat-chip.active,
body.dark-theme .gfiles-chip.active {
    background: rgba(255, 255, 255, 0.22) !important;
    border: 0.5px solid rgba(255, 255, 255, 0.35) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 0.88rem !important;
    padding: 7px 16px !important;
    border-radius: 22px !important;
}

/* 4. DATE HEADERS MATCHING DRAWER MENU CARDS (.frynzy-ios-card) */
body.dark-theme .gfiles-virtual-header,
body.dark-theme .gfiles-date-header,
body.dark-theme .gfiles-date-group {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 12px 14px 6px 14px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

body.dark-theme .gfiles-date-group-title,
body.dark-theme .gfiles-date-label,
body.dark-theme .gfiles-date-title,
body.dark-theme .media-date-header {
    display: inline-flex !important;
    align-items: center !important;
    background: rgba(255, 255, 255, 0.76) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.98) !important;
    border-radius: 14px !important;
    backdrop-filter: blur(30px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(30px) saturate(180%) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04), inset 0 1px 2px rgba(255, 255, 255, 1) !important;
    color: #111827 !important;
    font-weight: 700 !important;
    font-size: 0.88rem !important;
    padding: 6px 14px !important;
    margin: 4px 0 !important;
}

body.dark-theme .gfiles-group-checkbox,
body.dark-theme .gfiles-date-circle {
    border-color: rgba(255, 255, 255, 0.4) !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

body.dark-theme .gfiles-group-checkbox.checked,
body.dark-theme .gfiles-date-circle.checked {
    background: #2563eb !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FRYNEX ULTIMATE SETTINGS & ALL SUB-PAGES DARK THEME SPECIFICATION
   - Tout l'arrière-plan de Paramètres et sous-pages en noir pur OLED (#000000)
   - Les sections/cartes adoptent le style du contenu menu (.frynzy-ios-card)
   - Les titres de sections sur fond noir sont en BLANC PUR (#ffffff)
   - Les conteneurs d'icônes adoptent le verre cristal du menu (.frynzy-ios-row-icon)
   ═══════════════════════════════════════════════════════════════════════════ */

/* 1. PAGES & SOUS-PAGES PARAMÈTRES EN NOIR PUR (#000000) */
body.dark-theme .gfiles-settings-page,
body.dark-theme #tabContentProfile,
body.dark-theme .gfiles-sub-screen,
body.dark-theme .gfiles-sub-topbar,
body.dark-theme .gfiles-sub-body,
body.dark-theme .frynzy-acc-page,
body.dark-theme .frynzy-acc-nav,
body.dark-theme .frynzy-acc-body,
body.dark-theme .fcp-screen,
body.dark-theme .fcp-process-screen,
body.dark-theme .frynzy-biz-page,
body.dark-theme .frynzy-sub-page,
body.dark-theme #frynzyAccountsPage,
body.dark-theme #frynzyLangSelectScreen,
body.dark-theme #frynzySettingsAudioScreen,
body.dark-theme #frynzySettingsVideoScreen,
body.dark-theme #frynzySettingsEditorScreen,
body.dark-theme #frynzySettingsFyShareScreen,
body.dark-theme #frynzySettingsNotificationsScreen,
body.dark-theme #frynzyCamSettingsModal,
body.dark-theme #frynzySecureSettingsScreen,
body.dark-theme #frynzyCleanerContainer,
body.dark-theme #audioSettingsBody,
body.dark-theme #videoSettingsBody,
body.dark-theme #editorSettingsBody,
body.dark-theme #fyshareSettingsBody,
body.dark-theme #notificationSettingsBody,
body.dark-theme #frynzyLangBody,
body.dark-theme [id*="SettingsScreen"] {
    background: #000000 !important;
    color: #f1f5f9 !important;
}

/* 2. EN-TÊTES & TOPBARS DES SOUS-PAGES (FOND NOIR & TITRES EN BLANC PUR) */
body.dark-theme .gfiles-sub-topbar,
body.dark-theme .frynzy-acc-nav,
body.dark-theme .fcp-topbar,
body.dark-theme .frynzy-biz-nav {
    background: #000000 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

body.dark-theme .gfiles-sub-topbar-title,
body.dark-theme .frynzy-acc-nav-title,
body.dark-theme .fcp-topbar-title,
body.dark-theme .frynzy-biz-nav-title,
body.dark-theme .frynzy-vault-settings-title {
    color: #ffffff !important;
    font-weight: 700 !important;
}

body.dark-theme .gfiles-sub-back-btn,
body.dark-theme .gfiles-sub-action-btn,
body.dark-theme .frynzy-acc-nav-btn,
body.dark-theme .fcp-back-btn {
    color: #cbd5e1 !important;
}

/* 3. TITRES DE SECTIONS SUR FOND NOIR : TOUS EN BLANC PUR (#ffffff) */
body.dark-theme .gfiles-section-header,
body.dark-theme .frynzy-ios-group-title,
body.dark-theme .gfiles-lang-section-label,
body.dark-theme .gfiles-group-title,
body.dark-theme .settings-group-header,
body.dark-theme .fcp-group-header {
    color: #ffffff !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
    background: transparent !important;
    padding: 18px 18px 8px 18px !important;
}

/* 4. CARTES/SECTIONS STYLE MENU (.frynzy-ios-card) */
body.dark-theme .gfiles-setting-item,
body.dark-theme .frynzy-ios-group,
body.dark-theme .gfiles-lang-card-group,
body.dark-theme .gfiles-lang-card {
    background: rgba(255, 255, 255, 0.76) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.98) !important;
    border-radius: 18px !important;
    backdrop-filter: blur(30px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(30px) saturate(180%) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04), inset 0 1px 2px rgba(255, 255, 255, 1) !important;
    margin: 6px 14px !important;
    padding: 12px 14px !important;
    box-sizing: border-box !important;
}

body.dark-theme .gfiles-setting-item:active,
body.dark-theme .gfiles-lang-card:active {
    background: rgba(240, 242, 247, 0.92) !important;
    transform: scale(0.98) !important;
}

/* Conteneurs d'icônes : Verre cristal arrondi identique au menu (.frynzy-ios-row-icon) */
body.dark-theme .gfiles-icon-box {
    width: 36px !important;
    height: 36px !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.65) !important;
    backdrop-filter: blur(14px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(14px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.7) !important;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.85), 0 3px 8px rgba(0, 0, 0, 0.07) !important;
    color: #64748b !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1rem !important;
    flex-shrink: 0 !important;
}

body.dark-theme .gfiles-icon-box i,
body.dark-theme .gfiles-icon-box svg {
    color: #64748b !important;
    fill: #64748b !important;
}

/* Titres & Sous-titres des options dans les cartes */
body.dark-theme .gfiles-setting-title,
body.dark-theme .frynzy-ios-row-label,
body.dark-theme .gfiles-lang-name,
body.dark-theme #frynzyAccountsSettingTitle {
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
}

body.dark-theme .gfiles-setting-sub,
body.dark-theme .gfiles-lang-native,
body.dark-theme #frynzyAccountsSettingSub {
    color: #64748b !important;
    font-size: 0.8rem !important;
}

body.dark-theme .gfiles-chevron {
    color: #94a3b8 !important;
}

/* Cibles de sélection internes (Qualité Vidéo, Piste Audio) */
body.dark-theme .gfiles-audio-track-target-btn,
body.dark-theme .gfiles-video-quality-target-btn {
    background: rgba(0, 0, 0, 0.07) !important;
    color: #111827 !important;
    border-radius: 12px !important;
    padding: 6px 10px !important;
    font-weight: 600 !important;
}

/* Séparateurs transparents */
body.dark-theme .gfiles-divider {
    height: 6px !important;
    background: transparent !important;
    border: none !important;
    margin: 0 !important;
}

/* Barre de recherche dans les sous-pages */
body.dark-theme .gfiles-sub-search-bar {
    background: rgba(26, 26, 32, 0.76) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 24px !important;
    margin: 8px 14px !important;
}
body.dark-theme .gfiles-sub-search-input {
    background: transparent !important;
    color: #f1f5f9 !important;
}
body.dark-theme .gfiles-sub-search-icon {
    color: rgba(255, 255, 255, 0.65) !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FRYNEX ULTIMATE DARK THEME FIXES:
   1. Téléchargements: Bouton "Tout continuer" & cartes en blanc/noir
   2. Télécharger: Encadrement des plateformes comme dans Catégories & noms en blanc
   3. Récents fichiers: Arrière-plan où s'affichent les fichiers récents en noir pur
   ═══════════════════════════════════════════════════════════════════════════ */

/* 1. TÉLÉCHARGEMENTS ("Tout continuer" & Liste) */
body.dark-theme .dl-continue-all-btn,
body.dark-theme .dl-continue-all-btn span {
    color: #ffffff !important;
}

body.dark-theme .dl-continue-all-btn i {
    color: #ffffff !important;
}

body.dark-theme .dl-dedicated-title {
    color: #ffffff !important;
}

body.dark-theme .dl-dedicated-trash-btn i {
    color: #cbd5e1 !important;
}

body.dark-theme .dl-task-card {
    background: #14141e !important;
    border: 1.5px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 18px !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35) !important;
    color: #ffffff !important;
}

body.dark-theme .dl-task-title {
    color: #ffffff !important;
}

body.dark-theme .dl-task-meta {
    color: #94a3b8 !important;
}

/* 2. TÉLÉCHARGER (Plateformes & Titres) */
body.dark-theme #tabContentSearch .card,
body.dark-theme .card {
    background: #14141e !important;
    border: 1.5px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 18px !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45), inset 0 1px 2px rgba(255, 255, 255, 0.12) !important;
}

/* Noms des plateformes en BLANC PUR */
body.dark-theme #tabContentSearch .card-header h3,
body.dark-theme #tabContentSearch .icon-title h3,
body.dark-theme #tabContentSearch .card h3,
body.dark-theme .card-header h3,
body.dark-theme .icon-title h3,
body.dark-theme .card h3 {
    color: #ffffff !important;
    font-weight: 700 !important;
}

body.dark-theme #tabContentSearch .card-desc,
body.dark-theme .card-desc {
    color: #94a3b8 !important;
}

body.dark-theme #tabContentSearch .badge,
body.dark-theme .card .badge {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #cbd5e1 !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

/* 3. RÉCENTS FICHIERS (Arrière-plan en noir pur, suppression bande blanche) */
body.dark-theme #tabContentLecture,
body.dark-theme .lecture-screen-container,
body.dark-theme .gfiles-lecture-container,
body.dark-theme #gfilesRecentSection,
body.dark-theme .gfiles-recent-section,
body.dark-theme .gfiles-recent-carousel,
body.dark-theme #gfilesRecentCarousel,
body.dark-theme .gfiles-section,
body.dark-theme .gfiles-section:first-child {
    background: #000000 !important;
}

body.dark-theme .gfiles-recent-carousel {
    background: #000000 !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FRYNEX ULTRA-FAST ZERO-LAG SETTINGS & SUB-PAGES DARK THEME ENGINE
   - Titres de sections (ex: Préférences) en capsule style menu (.frynzy-ios-card)
   - Lignes de paramètres (Éditeur, Audio, etc.) ULTRA-LÉGÈRES, plates et fluides (120 FPS)
   - Suppression totale de backdrop-filter et box-shadow répétés (0 surcoût GPU)
   - Zéro recalcul DOM, défilement fluide sans saccades ni clignotement
   ═══════════════════════════════════════════════════════════════════════════ */

/* 1. PAGES & CONTENEURS : ACCÉLÉRATION MATÉRIELLE & DÉFILEMENT PUR GPU */
body.dark-theme .gfiles-settings-page,
body.dark-theme #tabContentProfile,
body.dark-theme .gfiles-sub-screen,
body.dark-theme .gfiles-sub-body,
body.dark-theme #audioSettingsBody,
body.dark-theme #videoSettingsBody,
body.dark-theme #editorSettingsBody,
body.dark-theme #fyshareSettingsBody,
body.dark-theme #notificationSettingsBody,
body.dark-theme #frynzyLangBody,
body.dark-theme .frynzy-acc-body {
    background: #000000 !important;
    color: #f1f5f9 !important;
    contain: layout style !important;
    will-change: scroll-position !important;
    touch-action: pan-y !important;
    -webkit-overflow-scrolling: touch !important;
}

/* 2. TITRES DE SECTIONS : SEULS LES TITRES ONT LE STYLE CAPSULE DU MENU */
body.dark-theme .gfiles-settings-page .gfiles-section-header,
body.dark-theme .gfiles-sub-screen .gfiles-section-header,
body.dark-theme .frynzy-ios-group-title,
body.dark-theme .gfiles-lang-section-label,
body.dark-theme .settings-group-header,
body.dark-theme .fcp-group-header {
    display: inline-flex !important;
    align-items: center !important;
    background: rgba(255, 255, 255, 0.76) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.98) !important;
    border-radius: 14px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08) !important;
    color: #111827 !important;
    font-weight: 700 !important;
    font-size: 0.82rem !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    padding: 6px 14px !important;
    margin: 18px 14px 6px 14px !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transform: translateZ(0) !important;
}

/* 3. LIGNES DE PARAMÈTRES (ÉDITEUR, AUDIO, ETC.) : ULTRA-FLUIDES ET LÉGÈRES */
body.dark-theme .gfiles-setting-item,
body.dark-theme .frynzy-ios-group,
body.dark-theme .gfiles-lang-card-group,
body.dark-theme .gfiles-lang-card {
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    margin: 0 !important;
    padding: 13px 18px !important;
    contain: layout style paint !important;
    transform: translateZ(0) !important;
    -webkit-transform: translateZ(0) !important;
    transition: background-color 0.12s ease !important;
}

body.dark-theme .gfiles-setting-item:active,
body.dark-theme .gfiles-lang-card:active {
    background: rgba(255, 255, 255, 0.06) !important;
    transform: none !important;
}

/* Conteneurs d'icônes discrets, crystal net sans filtre lourd */
body.dark-theme .gfiles-icon-box {
    width: 38px !important;
    height: 38px !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    color: #cbd5e1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1rem !important;
    flex-shrink: 0 !important;
    transform: translateZ(0) !important;
}

body.dark-theme .gfiles-icon-box i,
body.dark-theme .gfiles-icon-box svg {
    color: #cbd5e1 !important;
    fill: #cbd5e1 !important;
}

/* Titres & Sous-titres des options : Blanc éclatant et gris lisible */
body.dark-theme .gfiles-setting-title,
body.dark-theme .frynzy-ios-row-label,
body.dark-theme .gfiles-lang-name,
body.dark-theme #frynzyAccountsSettingTitle {
    color: #ffffff !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
}

body.dark-theme .gfiles-setting-sub,
body.dark-theme .gfiles-lang-native,
body.dark-theme #frynzyAccountsSettingSub {
    color: #94a3b8 !important;
    font-size: 0.8rem !important;
}

body.dark-theme .gfiles-chevron {
    color: #64748b !important;
}

/* Cibles interactives (Audio, Vidéo) */
body.dark-theme .gfiles-audio-track-target-btn,
body.dark-theme .gfiles-video-quality-target-btn {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 12px !important;
    padding: 5px 10px !important;
    font-weight: 600 !important;
}

/* Espacements propres entre sections */
body.dark-theme .gfiles-divider {
    height: 12px !important;
    background: transparent !important;
    border: none !important;
    margin: 0 !important;
}


/* ═══════════════════════════════════════════════════════════════════════════
   FRYNEX ULTIMATE DARK THEME & ZERO-LATENCY ENGINE (REVISION V1.0.4)
   - Corbeille : Tête en noir, Titre blanc, "La corbeille est vide" blanc
   - Corbeille : Bas en noir, boutons Restaurer/Supprimer en capsule menu pâle
   - Fy Share : Nom de l'appareil (#settingsFyShareDeviceBadge) en blanc lisible
   - Téléchargements : Filigrane de plateforme à droite en gris clair (#94a3b8)
   - Téléchargements : "Tout continuer" en blanc pur (#ffffff)
   - Télécharger : 0ms latence (backdrop-filter: none), encadrement net, noms en blanc
   - Paramètres : Titres en capsule menu, lignes ultra-légères (transparent, 120 FPS)
   - Fenêtres / Modales / Sous-pages : Fond noir pur (#000000), textes noirs -> blanc
   ═══════════════════════════════════════════════════════════════════════════ */

/* 1. CORBEILLE (TRASH SCREEN) : FOND NOIR, TOPBAR NOIRE, TITRES EN BLANC PUR */
body.dark-theme #trashDedicatedScreen,
body.dark-theme .trash-dedicated-screen,
body.dark-theme #trashScrollableContent,
body.dark-theme .trash-scrollable-content,
[data-theme="dark"] #trashDedicatedScreen,
[data-theme="dark"] .trash-dedicated-screen {
    background: #000000 !important;
    color: #ffffff !important;
}

body.dark-theme #trashNormalTopBar,
body.dark-theme #trashSelTopBar,
body.dark-theme .trash-top-bar,
body.dark-theme .trash-sel-top-bar {
    background: #000000 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

body.dark-theme .trash-main-title,
body.dark-theme .trash-bar-left h2,
body.dark-theme .trash-sel-count,
body.dark-theme .trash-sel-size,
body.dark-theme .trash-group-title,
body.dark-theme .trash-item-title,
body.dark-theme .trash-sheet-title,
body.dark-theme .trash-dialog-heading {
    color: #ffffff !important;
    font-weight: 700 !important;
}

body.dark-theme .trash-back-icon-btn,
body.dark-theme .trash-view-mode-btn,
body.dark-theme .trash-bar-right button {
    color: #cbd5e1 !important;
}

/* Bannière d'information 30 jours */
body.dark-theme #trashInfoBanner,
body.dark-theme .trash-info-banner {
    background: #14141e !important;
    border: 1.5px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 16px !important;
    color: #ffffff !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
}

body.dark-theme .trash-banner-art {
    background: rgba(34, 197, 94, 0.15) !important;
    color: #22c55e !important;
}

body.dark-theme .trash-banner-text {
    color: #e2e8f0 !important;
}

body.dark-theme .trash-banner-text a,
body.dark-theme .trash-learn-more {
    color: #3b82f6 !important;
    font-weight: 600 !important;
}

body.dark-theme .trash-banner-dismiss-btn {
    color: #3b82f6 !important;
    font-weight: 700 !important;
}

/* Ligne "Tous les éléments" */
body.dark-theme .trash-select-all-row {
    background: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

body.dark-theme .trash-select-all-label {
    color: #ffffff !important;
    font-weight: 600 !important;
}

body.dark-theme .trash-round-checkbox {
    border-color: rgba(255, 255, 255, 0.3) !important;
    background: transparent !important;
}

body.dark-theme .trash-round-checkbox.checked {
    background: #2563eb !important;
    border-color: #2563eb !important;
}

/* État vide : "La corbeille est vide" en BLANC PUR */
body.dark-theme .trash-empty-wrap,
body.dark-theme .trash-empty-3d-wrap {
    background: transparent !important;
}

body.dark-theme .trash-empty-title {
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 1.25rem !important;
    margin-top: 16px !important;
    text-align: center !important;
}

body.dark-theme .trash-empty-subtitle {
    color: #94a3b8 !important;
    font-size: 0.88rem !important;
    text-align: center !important;
    margin-top: 6px !important;
}

/* Section du bas Corbeille : fond NOIR PUR (#000000) */
body.dark-theme #trashActionBottomBar,
body.dark-theme .trash-action-bottombar {
    background: #000000 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: none !important;
    padding: 12px 16px 24px 16px !important;
    display: flex !important;
    gap: 12px !important;
}

/* Boutons Restaurer et Supprimer : Encadrement capsule comme le menu, PÂLE quand inactif */
body.dark-theme .trash-btn-restore,
body.dark-theme .trash-btn-delete,
body.dark-theme #btnTrashRestoreAction,
body.dark-theme #btnTrashDeleteAction {
    flex: 1 !important;
    height: 48px !important;
    border-radius: 14px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    transition: all 0.15s ease !important;
    box-sizing: border-box !important;
}

/* PÂLE QUAND AUCUN FICHIER N'EST SÉLECTIONNÉ */
body.dark-theme .trash-btn-restore.disabled,
body.dark-theme .trash-btn-delete.disabled,
body.dark-theme #btnTrashRestoreAction.disabled,
body.dark-theme #btnTrashDeleteAction.disabled,
body.dark-theme .trash-action-bottombar button[disabled],
body.dark-theme .trash-action-bottombar button.disabled {
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.22) !important;
    color: rgba(255, 255, 255, 0.38) !important;
    opacity: 0.7 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
}

body.dark-theme .trash-btn-restore.disabled i,
body.dark-theme .trash-btn-delete.disabled i,
body.dark-theme .trash-action-bottombar button.disabled i {
    color: rgba(255, 255, 255, 0.38) !important;
}

/* ACTIF QUAND DES FICHIERS SONT SÉLECTIONNÉS */
body.dark-theme .trash-btn-restore:not(.disabled),
body.dark-theme #btnTrashRestoreAction:not(.disabled) {
    background: #2563eb !important;
    border: 1.5px solid #3b82f6 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    opacity: 1 !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4) !important;
    cursor: pointer !important;
}

body.dark-theme .trash-btn-delete:not(.disabled),
body.dark-theme #btnTrashDeleteAction:not(.disabled) {
    background: #dc2626 !important;
    border: 1.5px solid #ef4444 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    opacity: 1 !important;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.4) !important;
    cursor: pointer !important;
}

/* Bottom sheets & Dialogues de suppression / restauration */
body.dark-theme .trash-restore-sheet-body,
body.dark-theme #trashRestoreBottomSheet,
body.dark-theme #trashDeleteDialog,
body.dark-theme .trash-delete-dialog,
body.dark-theme .frynzy-bottom-sheet {
    background: #14141e !important;
    color: #ffffff !important;
    border: 1.5px solid rgba(255, 255, 255, 0.18) !important;
}

body.dark-theme .trash-restore-prompt,
body.dark-theme .trash-dialog-desc {
    color: #cbd5e1 !important;
}

/* 2. PARAMÈTRES & FY SHARE : NOM DE L'APPAREIL EN BLANC PUR (#ffffff) */
body.dark-theme #settingsFyShareDeviceBadge,
body.dark-theme #fyshareSettingsDeviceNameVal,
body.dark-theme .fcp-badge-pill,
body.dark-theme [id*="DeviceBadge"] {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    font-weight: 700 !important;
}

body.dark-theme #fcpSettingsHealthBadge {
    color: #22c55e !important;
    background: rgba(34, 197, 94, 0.15) !important;
    border: 1px solid rgba(34, 197, 94, 0.3) !important;
}

body.dark-theme .fcp-badge-blue {
    color: #3b82f6 !important;
    background: rgba(59, 130, 246, 0.15) !important;
    border: 1px solid rgba(59, 130, 246, 0.3) !important;
}

/* Titres d'options Paramètres en BLANC PUR (#ffffff) */
body.dark-theme .gfiles-setting-title,
body.dark-theme .frynzy-ios-row-label,
body.dark-theme .gfiles-lang-name,
body.dark-theme #frynzyAccountsSettingTitle {
    color: #ffffff !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
}

body.dark-theme .gfiles-setting-sub,
body.dark-theme .gfiles-lang-native,
body.dark-theme #frynzyAccountsSettingSub,
body.dark-theme #settingsFyShareSubtitle {
    color: #94a3b8 !important;
    font-size: 0.82rem !important;
}

/* 3. TÉLÉCHARGEMENTS : FILIGRANE DE PLATEFORME À DROITE EN GRIS CLAIR (#94a3b8) */
body.dark-theme .dl-card-bg-watermark,
.dl-card-bg-watermark {
    color: #94a3b8 !important;
    opacity: 0.25 !important;
}

body.dark-theme .dl-card-bg-watermark i,
.dl-card-bg-watermark i {
    color: #94a3b8 !important;
}

body.dark-theme .dl-task-card {
    background: #14141e !important;
    border: 1.5px solid rgba(255, 255, 255, 0.16) !important;
    border-radius: 18px !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35) !important;
    color: #ffffff !important;
    position: relative !important;
    overflow: hidden !important;
}

body.dark-theme .dl-task-title {
    color: #ffffff !important;
    font-weight: 700 !important;
}

body.dark-theme .dl-task-status-row span,
body.dark-theme .dl-task-status-row i {
    color: #94a3b8 !important;
}

body.dark-theme .dl-completed-badge {
    color: #22c55e !important;
}

body.dark-theme .dl-completed-badge i {
    color: #22c55e !important;
}

body.dark-theme .dl-task-action-btn {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    color: #cbd5e1 !important;
    border-radius: 12px !important;
}

body.dark-theme .dl-task-action-btn i {
    color: #cbd5e1 !important;
}

/* Badge plateforme dans le thumbnail */
body.dark-theme .dl-task-thumb-badge {
    background: #1e293b !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

body.dark-theme .dl-task-thumb-badge .fa-tiktok {
    color: #ffffff !important;
}

/* Bouton "Tout continuer" en BLANC PUR */
body.dark-theme .dl-continue-all-btn,
body.dark-theme .dl-continue-all-btn span,
body.dark-theme .dl-continue-all-btn i {
    color: #ffffff !important;
    font-weight: 800 !important;
}

/* 4. TÉLÉCHARGER (SEARCH TAB) : ZÉRO LATENCE (0ms) & ENCADREMENT NET */
body.dark-theme #tabContentSearch .card,
body.dark-theme .card {
    background: #14141e !important;
    border: 1.5px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 18px !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
    contain: layout style paint !important;
    transform: translateZ(0) !important;
    -webkit-transform: translateZ(0) !important;
    touch-action: pan-y !important;
}

body.dark-theme #tabContentSearch .card-header h3,
body.dark-theme #tabContentSearch .icon-title h3,
body.dark-theme #tabContentSearch .card h3,
body.dark-theme .card-header h3,
body.dark-theme .icon-title h3,
body.dark-theme .card h3 {
    color: #ffffff !important;
    font-weight: 700 !important;
}

body.dark-theme #tabContentSearch .card-desc,
body.dark-theme .card-desc {
    color: #94a3b8 !important;
}

body.dark-theme #tabContentSearch .badge,
body.dark-theme .card .badge {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #cbd5e1 !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
}

body.dark-theme #tabContentSearch .service-input,
body.dark-theme .service-input {
    background: #ffffff !important;
    color: #0f172a !important;
    font-weight: 500 !important;
}

/* 5. RÉCENTS FICHIERS : FOND NOIR PUR (#000000) ET DISPARITION DU RECTANGLE BLANC */
body.dark-theme #gfilesRecentSection,
body.dark-theme .gfiles-recent-section,
body.dark-theme .gfiles-recent-carousel,
body.dark-theme #gfilesRecentCarousel,
body.dark-theme .gfiles-section,
body.dark-theme .gfiles-section:first-child,
body.dark-theme #tabContentLecture,
body.dark-theme .lecture-screen-container,
body.dark-theme .gfiles-lecture-container {
    background: #000000 !important;
}

/* 6. TOUTES LES SOUS-PAGES & FENÊTRES : FOND NOIR, TITRES EN BLANC PUR */
body.dark-theme .gfiles-cat-screen,
body.dark-theme #frynzyAppsScreen,
body.dark-theme #frynzyCategoryDetailScreen,
body.dark-theme .gfiles-explorer-modal,
body.dark-theme #frynzyStorageExplorerModal,
body.dark-theme .frynzy-sub-page,
body.dark-theme .fcp-screen,
body.dark-theme .fcp-process-screen,
body.dark-theme #fcpProcessDedicatedScreen,
body.dark-theme #frynzyAccountsPage,
body.dark-theme #frynzyInstagramPage,
body.dark-theme #frynzyYoutubePage,
body.dark-theme #frynzyWatchLaterPage,
body.dark-theme #frynzyBusinessScreen,
body.dark-theme #frynzyPromoteScreen,
body.dark-theme #frynzySecureFolderScreen,
body.dark-theme #frynzySecureSettingsScreen,
body.dark-theme #frynzyCodeEditorModal,
body.dark-theme #frynzyPdfViewerModal,
body.dark-theme #frynzyOfficeViewerModal,
body.dark-theme #frynzyEqualizerPage,
body.dark-theme .frynzy-eq-page,
body.dark-theme #frynzyLangSelectScreen,
body.dark-theme #frynzySettingsAudioScreen,
body.dark-theme #frynzySettingsVideoScreen,
body.dark-theme #frynzySettingsEditorScreen,
body.dark-theme #frynzySettingsFyShareScreen,
body.dark-theme #frynzySettingsNotificationsScreen,
body.dark-theme #frynzyCamSettingsModal,
body.dark-theme #frynzyCleanerContainer,
body.dark-theme .frynzy-modal-backdrop,
body.dark-theme .frynzy-sheet-backdrop {
    background-color: #000000 !important;
    color: #ffffff !important;
}

/* Topbars des sous-fenêtres : fond noir pur et titre blanc pur */
body.dark-theme .gfiles-cat-topbar,
body.dark-theme .gfiles-exp-topbar,
body.dark-theme .gfiles-sub-topbar,
body.dark-theme .fcp-topbar,
body.dark-theme .frynzy-acc-nav,
body.dark-theme .frynzy-biz-nav,
body.dark-theme .frynzy-eq-topbar,
body.dark-theme .frynzy-top-bar,
body.dark-theme .top-bar {
    background: #000000 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

body.dark-theme .gfiles-cat-title,
body.dark-theme .gfiles-exp-title,
body.dark-theme .gfiles-sub-topbar-title,
body.dark-theme .fcp-topbar-title,
body.dark-theme .frynzy-acc-nav-title,
body.dark-theme .frynzy-biz-nav-title,
body.dark-theme .frynzy-eq-page-title,
body.dark-theme .frynzy-folder-title,
body.dark-theme .gfiles-folder-title,
body.dark-theme .frynzy-vault-settings-title,
body.dark-theme .fcp-group-header,
body.dark-theme .fcp-screen-title,
body.dark-theme .fcp-card-title,
body.dark-theme .fcp-meter-title,
body.dark-theme h1,
body.dark-theme h2,
body.dark-theme h3,
body.dark-theme h4 {
    color: #ffffff !important;
}

body.dark-theme .gfiles-cat-back-btn,
body.dark-theme .gfiles-exp-back-btn,
body.dark-theme .gfiles-sub-back-btn,
body.dark-theme .fcp-back-btn,
body.dark-theme .frynzy-acc-nav-btn,
body.dark-theme .frynzy-eq-nav-btn,
body.dark-theme .gfiles-cat-icon-btn,
body.dark-theme .gfiles-exp-icon-btn {
    color: #cbd5e1 !important;
}

/* Modales et Bottom Sheets : Arrière-plan sombre #14141e */
body.dark-theme .frynzy-dialog-box,
body.dark-theme .frynzy-modal-box,
body.dark-theme .gfiles-dialog-box,
body.dark-theme .gfiles-bottom-sheet,
body.dark-theme #gfilesVolumeSheet,
body.dark-theme #gfilesSortSheet,
body.dark-theme #gfilesStorageFilterSheet,
body.dark-theme .frynzy-bottom-sheet,
body.dark-theme .frynzy-security-dialog,
body.dark-theme .frynzy-vault-dialog-card,
body.dark-theme .frynzy-search-results-modal {
    background: #14141e !important;
    border: 1.5px solid rgba(255, 255, 255, 0.16) !important;
    color: #ffffff !important;
}

body.dark-theme .gfiles-dialog-title,
body.dark-theme .gfiles-sheet-title,
body.dark-theme .frynzy-dialog-title,
body.dark-theme .frynzy-modal-title,
body.dark-theme .sheet-title {
    color: #ffffff !important;
    font-weight: 700 !important;
}

body.dark-theme .gfiles-dialog-desc,
body.dark-theme .gfiles-sheet-sub,
body.dark-theme .sheet-desc {
    color: #94a3b8 !important;
}

/* Boutons d'action dans modales */
body.dark-theme .gfiles-dialog-btn-cancel,
body.dark-theme .frynzy-dialog-btn-cancel {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #cbd5e1 !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

body.dark-theme .gfiles-dialog-btn-confirm,
body.dark-theme .frynzy-dialog-btn-confirm {
    background: #2563eb !important;
    color: #ffffff !important;
    border: none !important;
    font-weight: 700 !important;
}

/* Règle absolue : aucun texte noir sur fond sombre en mode sombre */
body.dark-theme span:not([style*="color: #2563eb"]):not([style*="color:#2563eb"]):not([style*="color: #ef4444"]):not([style*="color: #22c55e"]):not([style*="color: #34c759"]):not([class*="badge-green"]):not([class*="badge-blue"]) {
    border-color: rgba(255, 255, 255, 0.12);
}



/* ═══════════════════════════════════════════════════════════════════════════
   FRYNEX ULTIMATE DUAL-THEME & MULTI-SCREEN ENGINE (V1.0.5)
   - Mode clair : 100% BLANC PUR, suppression totale des barres et coupures noires
   - Outils Business : Fond noir, titre "Performance des 7 jours" blanc, 3 cartes blanches/grises, icônes 3-points et info blanc/gris clair
   - Sélection d'une période (Recherche) : Fond noir, textes blancs/gris, sélection BLEU ET ROSE
   - Catégorie, Stockage interne & Date : Fond noir, icône retour claire, titres blancs
   ═══════════════════════════════════════════════════════════════════════════ */

/* A. RESTAURATION TOTALE DU MODE CLAIR (AUCUNE COUPE NI BANDE NOIRE) */
body:not(.dark-theme) #tabContentProfile,
body:not(.dark-theme) .gfiles-settings-page,
body:not(.dark-theme) .gfiles-sub-screen,
body:not(.dark-theme) .gfiles-sub-body,
body:not(.dark-theme) #audioSettingsBody,
body:not(.dark-theme) #videoSettingsBody,
body:not(.dark-theme) #editorSettingsBody,
body:not(.dark-theme) #fyshareSettingsBody,
body:not(.dark-theme) #notificationSettingsBody,
body:not(.dark-theme) #frynzyLangBody,
body:not(.dark-theme) .frynzy-acc-body {
    background: #ffffff !important;
    color: #111827 !important;
}

body:not(.dark-theme) .gfiles-setting-item {
    background: #ffffff !important;
    color: #111827 !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

body:not(.dark-theme) .gfiles-section-header {
    background: #f8f9fa !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    color: #5f6368 !important;
    padding: 16px 18px 6px !important;
    display: flex !important;
}

body:not(.dark-theme) .gfiles-divider {
    background: #f8f9fa !important;
    height: 8px !important;
    border: none !important;
}

/* B. OUTILS BUSINESS EN MODE SOMBRE (BLACK BACKGROUND, WHITE & LIGHT GRAY TEXT) */
body.dark-theme #frynzyBusinessScreen,
body.dark-theme .frynzy-biz-page {
    background-color: #000000 !important;
    background-image: none !important;
    color: #ffffff !important;
}

body.dark-theme .frynzy-biz-header {
    background: #000000 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

body.dark-theme .frynzy-biz-header-title {
    color: #ffffff !important;
    font-weight: 700 !important;
}

body.dark-theme .frynzy-biz-back-btn,
body.dark-theme .frynzy-biz-menu-btn,
body.dark-theme .frynzy-biz-menu-btn i {
    color: #cbd5e1 !important;
}

/* Titre "Performance des 7 derniers jours" en BLANC PUR */
body.dark-theme .frynzy-biz-section-title {
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 0.98rem !important;
}

/* Bouton Info (i) en gris clair visible */
body.dark-theme .frynzy-biz-info-btn {
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    color: #cbd5e1 !important;
}

body.dark-theme .frynzy-biz-info-btn i {
    color: #cbd5e1 !important;
}

/* Grille des 3 métriques style WhatsApp en mode sombre */
body.dark-theme .frynzy-biz-metric-card {
    background: #14141e !important;
    border: 1.5px solid rgba(255, 255, 255, 0.14) !important;
    border-radius: 14px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
}

body.dark-theme .frynzy-biz-metric-icon {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #60a5fa !important;
}

body.dark-theme .frynzy-biz-metric-val {
    color: #ffffff !important;
    font-weight: 800 !important;
}

body.dark-theme .frynzy-biz-metric-lbl {
    color: #94a3b8 !important;
    font-weight: 600 !important;
}

/* Carte Call-To-Action "Créez votre première publicité" */
body.dark-theme .frynzy-biz-promo-card {
    background: #14141e !important;
    border: 1.5px solid rgba(255, 255, 255, 0.14) !important;
    border-radius: 16px !important;
}

body.dark-theme .frynzy-biz-promo-title {
    color: #ffffff !important;
    font-weight: 700 !important;
}

body.dark-theme .frynzy-biz-promo-desc {
    color: #94a3b8 !important;
}

body.dark-theme .frynzy-biz-promo-icon {
    background: rgba(37, 99, 235, 0.15) !important;
    color: #3b82f6 !important;
}

/* Modal Explication des performances */
body.dark-theme #frynzyBizInfoModal .frynzy-crystal-bottom-sheet {
    background: #14141e !important;
    border: 1.5px solid rgba(255, 255, 255, 0.18) !important;
    color: #ffffff !important;
}

body.dark-theme #frynzyBizInfoModal .frynzy-sheet-title {
    color: #ffffff !important;
    font-weight: 700 !important;
}

body.dark-theme #frynzyBizInfoModal .frynzy-info-item-title {
    color: #ffffff !important;
    font-weight: 600 !important;
}

body.dark-theme #frynzyBizInfoModal .frynzy-info-item-desc {
    color: #94a3b8 !important;
}

/* C. RECHERCHE DATE ("SÉLECTIONNER UNE PÉRIODE") : FOND NOIR, BLEU ET ROSE */
body.dark-theme #gfilesSearchDateModal,
body.dark-theme .gfiles-calendar-modal {
    background: #000000 !important;
    color: #ffffff !important;
}

body.dark-theme .gfiles-calendar-topbar {
    background: #000000 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

body.dark-theme .gfiles-calendar-close-btn,
body.dark-theme .gfiles-calendar-close-btn i {
    color: #cbd5e1 !important;
}

body.dark-theme .gfiles-calendar-save-btn {
    color: #3b82f6 !important;
    font-weight: 700 !important;
}

body.dark-theme .gfiles-calendar-subheading {
    color: #94a3b8 !important;
}

body.dark-theme .gfiles-calendar-range-label {
    color: #ffffff !important;
    font-weight: 700 !important;
}

body.dark-theme .gfiles-calendar-range-label i {
    color: #94a3b8 !important;
}

body.dark-theme .gfiles-calendar-weekdays {
    background: #000000 !important;
    color: #94a3b8 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

body.dark-theme .gfiles-calendar-month-title {
    color: #ffffff !important;
    font-weight: 700 !important;
}

body.dark-theme .gfiles-cal-day {
    color: #cbd5e1 !important;
}

/* SÉLECTION DES DATES : BLEU ET ROSE (ET NON NOIR ET ROSE) */
/* 1. Date de départ : BLEU (#2563eb) */
.gfiles-cal-day.range-start span,
body.dark-theme .gfiles-cal-day.range-start span {
    background: #2563eb !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.55) !important;
}

/* 2. Date de fin : ROSE (#ec4899) */
.gfiles-cal-day.range-end span,
body.dark-theme .gfiles-cal-day.range-end span {
    background: #ec4899 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 10px rgba(236, 72, 153, 0.55) !important;
}

/* 3. Intervalle intermédiaire : subtil fondu Bleu/Rose */
.gfiles-cal-day.in-range span,
body.dark-theme .gfiles-cal-day.in-range span {
    background: rgba(37, 99, 235, 0.22) !important;
    color: #ffffff !important;
}

.gfiles-cal-day.in-range::before,
body.dark-theme .gfiles-cal-day.in-range::before {
    background: rgba(37, 99, 235, 0.25) !important;
}

.gfiles-cal-day.range-start::before,
body.dark-theme .gfiles-cal-day.range-start::before {
    background: rgba(37, 99, 235, 0.25) !important;
}

.gfiles-cal-day.range-end::before,
body.dark-theme .gfiles-cal-day.range-end::before {
    background: rgba(236, 72, 153, 0.25) !important;
}

/* D. CATÉGORIE, STOCKAGE INTERNE & DATE : FOND NOIR, TEXTES BLANC/GRIS, RETOUR LISIBLE */
body.dark-theme .gfiles-cat-screen,
body.dark-theme #frynzyCategoryDetailScreen,
body.dark-theme #frynzyAppsScreen,
body.dark-theme .gfiles-explorer-modal,
body.dark-theme #frynzyStorageExplorerModal {
    background: #000000 !important;
    color: #ffffff !important;
}

body.dark-theme .gfiles-cat-topbar,
body.dark-theme .gfiles-exp-topbar {
    background: #000000 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* Icône retour dans Catégorie et Stockage interne */
body.dark-theme .gfiles-cat-back-btn,
body.dark-theme .gfiles-exp-back-btn,
body.dark-theme .gfiles-cat-back-btn i,
body.dark-theme .gfiles-exp-back-btn i {
    color: #cbd5e1 !important;
    font-size: 1.25rem !important;
}

body.dark-theme .gfiles-cat-title,
body.dark-theme .gfiles-exp-title {
    color: #ffffff !important;
    font-weight: 700 !important;
}

body.dark-theme .gfiles-cat-icon-btn,
body.dark-theme .gfiles-exp-icon-btn,
body.dark-theme .gfiles-cat-icon-btn i,
body.dark-theme .gfiles-exp-icon-btn i {
    color: #cbd5e1 !important;
}

/* En-têtes de dates (Date Header) dans Catégorie */
body.dark-theme .gfiles-date-header,
body.dark-theme .gfiles-date-group-title,
body.dark-theme .gfiles-date-label,
body.dark-theme .media-date-header {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #cbd5e1 !important;
    font-weight: 600 !important;
}

/* Dossiers et fichiers dans Catégorie et Stockage */
body.dark-theme .gfiles-cat-card,
body.dark-theme .gfiles-folder-card,
body.dark-theme .gfiles-file-row {
    background: #14141e !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 14px !important;
    color: #ffffff !important;
}

body.dark-theme .gfiles-folder-title,
body.dark-theme .gfiles-item-title,
body.dark-theme .gfiles-cat-item-title {
    color: #ffffff !important;
    font-weight: 600 !important;
}

body.dark-theme .gfiles-folder-sub,
body.dark-theme .gfiles-item-meta,
body.dark-theme .gfiles-cat-item-sub {
    color: #94a3b8 !important;
}



/* ═══════════════════════════════════════════════════════════════════════════
   FRYNEX ULTIMATE REVISION V1.0.6 : SPECIFIC USER FIXES
   1. Outils Business : Titres dans l'explication des performances en BLANC PUR
   2. Télécharger : Champ de saisie (.input-area) élégant sans bloc blanc brut
   3. Menu latéral : Titre "Menu" en BLANC PUR et en-têtes en gris clair
   4. Playlist : Boutons de navigation et d'actions style iOS Pro ultra-tactiles
   ═══════════════════════════════════════════════════════════════════════════ */

/* 1. OUTILS BUSINESS — EXPLICATION DES PERFORMANCES EN BLANC PUR (#ffffff) */
body.dark-theme .frynzy-biz-info-title,
.frynzy-biz-info-title {
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 0.96rem !important;
}

body.dark-theme .frynzy-biz-info-text,
.frynzy-biz-info-text {
    color: #94a3b8 !important;
    font-size: 0.82rem !important;
    line-height: 1.35 !important;
}

body.dark-theme .frynzy-biz-info-icon-box {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #60a5fa !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
}

body.dark-theme #frynzyBizInfoModal .frynzy-crystal-bottom-sheet {
    background: #14141e !important;
    border: 1.5px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 24px 24px 0 0 !important;
    color: #ffffff !important;
}

body.dark-theme #frynzyBizInfoModal .frynzy-sheet-title {
    color: #ffffff !important;
    font-weight: 700 !important;
}

/* 2. TÉLÉCHARGER — CHAMPS DE SAISIE ÉLÉGANTS & INTÉGRÉS (PLUS DE BLOC BLANC BRUT) */
body.dark-theme #tabContentSearch .input-area,
body.dark-theme .input-area {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 14px !important;
    padding: 4px 6px 4px 14px !important;
    display: flex !important;
    align-items: center !important;
    box-sizing: border-box !important;
    width: 100% !important;
    transition: border-color 0.15s ease, background-color 0.15s ease !important;
}

body.dark-theme #tabContentSearch .input-area:focus-within,
body.dark-theme .input-area:focus-within {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25) !important;
}

body.dark-theme #tabContentSearch .service-input,
body.dark-theme .service-input {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    color: #ffffff !important;
    font-size: 0.92rem !important;
    font-weight: 500 !important;
    flex: 1 !important;
    padding: 8px 6px 8px 0 !important;
    box-shadow: none !important;
}

body.dark-theme #tabContentSearch .service-input::placeholder,
body.dark-theme .service-input::placeholder {
    color: #94a3b8 !important;
}

body.dark-theme #tabContentSearch .btn-action,
body.dark-theme .btn-action {
    background: #2563eb !important;
    border: none !important;
    border-radius: 10px !important;
    color: #ffffff !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4) !important;
    transition: transform 0.12s ease !important;
}

body.dark-theme #tabContentSearch .btn-action:active,
body.dark-theme .btn-action:active {
    transform: scale(0.92) !important;
}

/* 3. MENU LATÉRAL — TITRE "Menu" EN BLANC PUR (#ffffff) & EN-TÊTES GRIS CLAIR */
.frynzy-ios-drawer-title,
body.dark-theme .frynzy-ios-drawer-title {
    color: #ffffff !important;
    font-weight: 800 !important;
    font-size: 1.4rem !important;
    letter-spacing: -0.4px !important;
}

.frynzy-ios-close-btn,
body.dark-theme .frynzy-ios-close-btn {
    color: #cbd5e1 !important;
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    width: 34px !important;
    height: 34px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
}

.frynzy-ios-section-header,
body.dark-theme .frynzy-ios-section-header {
    color: #cbd5e1 !important;
    font-weight: 700 !important;
    font-size: 0.74rem !important;
    letter-spacing: 0.6px !important;
    text-transform: uppercase !important;
}

/* 4. PLAYLIST & ÉCRANS LIÉS — BOUTONS PRO STYLE iOS (DARK & LIGHT MODE) */
#frynzyPlaylistSetupPage {
    z-index: 10009200 !important;
}

#frynzyImportMusicPage {
    z-index: 10009650 !important;
}

#frynzyNewPlaylistPage {
    z-index: 10009200 !important;
}

#frynzyPlaylistsPage {
    z-index: 10009100 !important;
}

/* Bouton Retour style iOS Pro (Circulaire avec retour tactile doux) */
.frynzy-ios-back-btn {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(142, 142, 147, 0.16) !important;
    border: 1px solid rgba(142, 142, 147, 0.22) !important;
    color: #007aff !important;
    font-size: 1rem !important;
    cursor: pointer !important;
    transition: transform 0.12s ease, background 0.12s ease !important;
    box-sizing: border-box !important;
    padding: 0 !important;
}

.frynzy-ios-back-btn:active {
    transform: scale(0.92) !important;
    background: rgba(142, 142, 147, 0.3) !important;
}

body.dark-theme .frynzy-ios-back-btn {
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    color: #ffffff !important;
}

/* Boutons d'action droite style iOS Pro */
.frynzy-ios-header-btn {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(142, 142, 147, 0.16) !important;
    border: 1px solid rgba(142, 142, 147, 0.22) !important;
    color: #007aff !important;
    font-size: 0.95rem !important;
    cursor: pointer !important;
    transition: transform 0.12s ease, background 0.12s ease !important;
    box-sizing: border-box !important;
    padding: 0 !important;
}

.frynzy-ios-header-btn:active {
    transform: scale(0.92) !important;
}

body.dark-theme .frynzy-ios-header-btn {
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    color: #cbd5e1 !important;
}

/* Bouton + (Ajouter) : Cercle bleu iOS Pro vibrant */
#frynzySetupAddBtn {
    background: #007aff !important;
    border: 1px solid #007aff !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.4) !important;
}

#frynzySetupAddBtn i {
    color: #ffffff !important;
    font-size: 0.95rem !important;
}

/* Bouton Check (Sauvegarder) : Cercle vert iOS Pro vibrant */
#frynzySetupSaveBtn {
    background: #34c759 !important;
    border: 1px solid #34c759 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(52, 199, 89, 0.4) !important;
}

#frynzySetupSaveBtn i {
    color: #ffffff !important;
    font-size: 0.95rem !important;
}



/* ==========================================================================
   TURN 14: SEARCH BOTTOMSHEETS, CALENDAR, FY SHARE, PLAYLIST BUTTONS
   ========================================================================== */

/* 1. SEARCH FILTER BOTTOMSHEETS (DARK THEME) */
body.dark-theme .gfiles-bottomsheet,
.dark-theme .gfiles-bottomsheet,
body.dark-theme #gfilesSearchStorageSheet .gfiles-bottomsheet,
body.dark-theme #gfilesSearchSortSheet .gfiles-bottomsheet,
body.dark-theme #gfilesSearchCatSheet .gfiles-bottomsheet {
    background: #111625 !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    border-radius: 24px 24px 0 0 !important;
    color: #ffffff !important;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.6) !important;
}

body.dark-theme .gfiles-bottomsheet-handle,
.dark-theme .gfiles-bottomsheet-handle {
    background: rgba(255, 255, 255, 0.28) !important;
}

body.dark-theme .gfiles-bottomsheet-title,
.dark-theme .gfiles-bottomsheet-title {
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 1.08rem !important;
}

body.dark-theme .gfiles-sheet-row,
.dark-theme .gfiles-sheet-row {
    color: #ffffff !important;
    border-radius: 12px !important;
    transition: background 0.12s ease !important;
}

body.dark-theme .gfiles-sheet-row:active,
body.dark-theme .gfiles-sheet-row:hover,
.dark-theme .gfiles-sheet-row:active,
.dark-theme .gfiles-sheet-row:hover {
    background: rgba(255, 255, 255, 0.08) !important;
}

body.dark-theme .gfiles-sheet-row-left,
.dark-theme .gfiles-sheet-row-left {
    color: #ffffff !important;
}

body.dark-theme .gfiles-sheet-row-left span,
body.dark-theme .gfiles-sheet-row span,
.dark-theme .gfiles-sheet-row-left span,
.dark-theme .gfiles-sheet-row span {
    color: #ffffff !important;
    font-weight: 600 !important;
    font-size: 0.98rem !important;
}

body.dark-theme .gfiles-sheet-row-left i,
body.dark-theme .gfiles-sheet-row i,
.dark-theme .gfiles-sheet-row-left i,
.dark-theme .gfiles-sheet-row i {
    color: #94a3b8 !important;
}

/* Custom Radio & Checkbox in Dark Theme */
body.dark-theme .gfiles-radio,
.dark-theme .gfiles-radio {
    border: 2px solid rgba(255, 255, 255, 0.35) !important;
    background: transparent !important;
}

body.dark-theme .gfiles-radio.selected,
.dark-theme .gfiles-radio.selected {
    border-color: #3b82f6 !important;
}

body.dark-theme .gfiles-radio.selected::after,
.dark-theme .gfiles-radio.selected::after {
    background: #3b82f6 !important;
}

body.dark-theme .gfiles-checkbox,
.dark-theme .gfiles-checkbox {
    border: 2px solid rgba(255, 255, 255, 0.35) !important;
    background: transparent !important;
    color: transparent !important;
}

body.dark-theme .gfiles-checkbox.checked,
.dark-theme .gfiles-checkbox.checked {
    background: #3b82f6 !important;
    border-color: #3b82f6 !important;
    color: #ffffff !important;
}

body.dark-theme .gfiles-checkbox.checked i,
.dark-theme .gfiles-checkbox.checked i {
    color: #ffffff !important;
}

/* 2. DATE CALENDAR MODAL (BLEU ET ROSE) */
.gfiles-cal-day.range-start span {
    background: #2563eb !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.55) !important;
}

.gfiles-cal-day.range-end span {
    background: #ec4899 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 10px rgba(236, 72, 153, 0.55) !important;
}

body.dark-theme .gfiles-cal-day span,
.dark-theme .gfiles-cal-day span {
    color: #ffffff !important;
}

body.dark-theme .gfiles-cal-day.empty span,
.dark-theme .gfiles-cal-day.empty span {
    color: transparent !important;
}

body.dark-theme .gfiles-cal-day.future-disabled span,
.dark-theme .gfiles-cal-day.future-disabled span {
    color: #64748b !important;
    opacity: 0.3 !important;
}

/* 3. FY SHARE SETTINGS & DEVICE NAME PILL */
.fyshare-device-pill,
#fyshareSettingsDeviceNameVal {
    display: inline-flex !important;
    align-items: center !important;
    padding: 4px 12px !important;
    border-radius: 20px !important;
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    margin-right: 8px !important;
}

body:not(.dark-theme) .fyshare-device-pill,
body:not(.dark-theme) #fyshareSettingsDeviceNameVal {
    background: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
}

body.dark-theme .fyshare-device-pill,
body.dark-theme #fyshareSettingsDeviceNameVal {
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    color: #ffffff !important;
}

.fyshare-edit-pen {
    color: #3b82f6 !important;
    font-size: 0.85rem !important;
    cursor: pointer !important;
    padding: 4px !important;
}

/* FY SHARE ICON BOXES */
#fyshareSettingsBody .gfiles-icon-box,
#rowFyShareSettings .gfiles-icon-box {
    width: 38px !important;
    height: 38px !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.05rem !important;
    flex-shrink: 0 !important;
}

body:not(.dark-theme) #fyshareSettingsBody .gfiles-icon-box,
body:not(.dark-theme) #rowFyShareSettings .gfiles-icon-box {
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
    color: #475569 !important;
}

body.dark-theme #fyshareSettingsBody .gfiles-icon-box,
body.dark-theme #rowFyShareSettings .gfiles-icon-box {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    color: #cbd5e1 !important;
}

body.dark-theme #fyshareSettingsBody .gfiles-icon-box i,
body.dark-theme #rowFyShareSettings .gfiles-icon-box i {
    color: #cbd5e1 !important;
}

/* FY SHARE SUB-SCREEN BODY & ITEMS */
body.dark-theme #fyshareSettingsBody {
    background: #000000 !important;
    color: #ffffff !important;
}

body.dark-theme #fyshareSettingsBody .gfiles-setting-item {
    background: #000000 !important;
    color: #ffffff !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

body.dark-theme #fyshareSettingsBody .gfiles-setting-title {
    color: #ffffff !important;
    font-weight: 600 !important;
}

body.dark-theme #fyshareSettingsBody .gfiles-setting-sub {
    color: #94a3b8 !important;
}

body.dark-theme #fyshareSettingsBody .gfiles-section-header {
    color: #cbd5e1 !important;
    font-weight: 700 !important;
}

/* Device badge in settings main page */
#settingsFyShareDeviceBadge {
    border-radius: 12px !important;
    padding: 3px 10px !important;
    font-weight: 700 !important;
    font-size: 0.82rem !important;
}

body:not(.dark-theme) #settingsFyShareDeviceBadge {
    background: #e2e8f0 !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
}

body.dark-theme #settingsFyShareDeviceBadge {
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

/* 4. PLAYLIST SETUP & IMPORT PAGE BUTTONS (iOS STYLE) */
.frynzy-ios-back-btn {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: transform 0.12s ease, opacity 0.12s ease !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

body:not(.dark-theme) .frynzy-ios-back-btn {
    background: rgba(0, 0, 0, 0.06) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    color: #007aff !important;
}

body.dark-theme .frynzy-ios-back-btn {
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    color: #38bdf8 !important;
}

.frynzy-ios-back-btn:active {
    transform: scale(0.92) !important;
    opacity: 0.8 !important;
}

.frynzy-ios-header-btn {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: transform 0.12s ease, opacity 0.12s ease !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

body:not(.dark-theme) .frynzy-ios-header-btn {
    background: rgba(0, 0, 0, 0.06) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    color: #007aff !important;
}

body.dark-theme .frynzy-ios-header-btn {
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    color: #cbd5e1 !important;
}

.frynzy-ios-header-btn:active {
    transform: scale(0.92) !important;
    opacity: 0.8 !important;
}

/* Distinct Action Buttons */
#frynzySetupAddBtn {
    background: rgba(0, 122, 255, 0.14) !important;
    border: 1.5px solid rgba(0, 122, 255, 0.35) !important;
    color: #007aff !important;
}
body.dark-theme #frynzySetupAddBtn {
    background: rgba(56, 189, 248, 0.18) !important;
    border: 1.5px solid rgba(56, 189, 248, 0.4) !important;
    color: #38bdf8 !important;
}
#frynzySetupAddBtn i {
    color: inherit !important;
    font-size: 1rem !important;
}

#frynzySetupSaveBtn {
    background: rgba(34, 197, 94, 0.14) !important;
    border: 1.5px solid rgba(34, 197, 94, 0.35) !important;
    color: #16a34a !important;
}
body.dark-theme #frynzySetupSaveBtn {
    background: rgba(74, 222, 128, 0.18) !important;
    border: 1.5px solid rgba(74, 222, 128, 0.4) !important;
    color: #4ade80 !important;
}
#frynzySetupSaveBtn i {
    color: inherit !important;
    font-size: 1rem !important;
}

#frynzySetupProToolsBtn {
    background: rgba(245, 158, 11, 0.14) !important;
    border: 1.5px solid rgba(245, 158, 11, 0.35) !important;
    color: #d97706 !important;
}
body.dark-theme #frynzySetupProToolsBtn {
    background: rgba(251, 191, 36, 0.18) !important;
    border: 1.5px solid rgba(251, 191, 36, 0.4) !important;
    color: #fbbf24 !important;
}
#frynzySetupProToolsBtn i {
    color: inherit !important;
    font-size: 1rem !important;
}

/* Ensure Import page is strictly in front of Playlist Setup page */
#frynzyPlaylistSetupPage {
    z-index: 10009200 !important;
}
#frynzyImportMusicPage {
    z-index: 10009650 !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FRYNEX PLAYLIST SETUP - DARK THEME TRACK ROWS
   ═══════════════════════════════════════════════════════════════════════════ */

/* Dark theme: audio rows should be dark, not white */
body.dark-theme .frynzy-audio-row,
.dark-theme .frynzy-audio-row {
    background: rgba(255, 255, 255, 0.07) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) !important;
}
body.dark-theme .frynzy-audio-row:active,
.dark-theme .frynzy-audio-row:active {
    background: rgba(255, 255, 255, 0.14) !important;
}
body.dark-theme .frynzy-audio-title,
.dark-theme .frynzy-audio-title {
    color: #ffffff !important;
}
body.dark-theme .frynzy-audio-sub,
.dark-theme .frynzy-audio-sub {
    color: #94a3b8 !important;
}
body.dark-theme .frynzy-audio-thumb,
.dark-theme .frynzy-audio-thumb {
    background: rgba(255, 255, 255, 0.1) !important;
}
body.dark-theme .frynzy-playlist-search-input,
.dark-theme .frynzy-playlist-search-input {
    color: #ffffff !important;
}
body.dark-theme .frynzy-playlist-search-icon,
.dark-theme .frynzy-playlist-search-icon {
    color: #94a3b8 !important;
}
body.dark-theme #frynzySetupTracksContainer,
.dark-theme #frynzySetupTracksContainer {
    color: #ffffff !important;
}
/* Dark theme: Import music filter bar */
body.dark-theme .frynzy-import-filter-bar,
.dark-theme .frynzy-import-filter-bar {
    background: #0f172a !important;
    border-bottom: 1px solid rgba(255,255,255,0.1) !important;
}
body.dark-theme .frynzy-filter-chip,
.dark-theme .frynzy-filter-chip {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #e2e8f0 !important;
}
body.dark-theme .frynzy-filter-chip.active,
.dark-theme .frynzy-filter-chip.active {
    background: #007aff !important;
    color: #ffffff !important;
}
/* Dark theme: Setup batch dropdown */
body.dark-theme .frynzy-setup-batch-dropdown,
body.dark-theme #frynzyImportBatchMenu,
.dark-theme .frynzy-setup-batch-dropdown,
.dark-theme #frynzyImportBatchMenu {
    background: #1e293b !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important;
}
body.dark-theme .frynzy-batch-opt-row,
.dark-theme .frynzy-batch-opt-row {
    color: #e2e8f0 !important;
    border-bottom: 1px solid rgba(255,255,255,0.08) !important;
}
body.dark-theme .frynzy-batch-opt-row:active,
.dark-theme .frynzy-batch-opt-row:active {
    background: rgba(255,255,255,0.08) !important;
}
body.dark-theme .frynzy-batch-opt-row.danger,
.dark-theme .frynzy-batch-opt-row.danger {
    color: #ff6b6b !important;
}


/* ═══════════════════════════════════════════════════════════════════════════
   DARK THEME OVERRIDES FOR PLAYLIST SETUP & TRACK ROWS (HIGHEST SPECIFICITY)
   ═══════════════════════════════════════════════════════════════════════════ */
body.dark-theme #frynzyPlaylistSetupPage,
.dark-theme #frynzyPlaylistSetupPage,
body.dark-theme #frynzyImportMusicPage,
.dark-theme #frynzyImportMusicPage,
body.dark-theme #frynzyNewPlaylistPage,
.dark-theme #frynzyNewPlaylistPage,
body.dark-theme #frynzyPlaylistsPage,
.dark-theme #frynzyPlaylistsPage,
body.dark-theme .frynzy-ios-page,
.dark-theme .frynzy-ios-page {
    background: #0b1120 !important;
    background-color: #0b1120 !important;
    background-image: none !important;
    color: #ffffff !important;
}

body.dark-theme .frynzy-ios-page-content,
.dark-theme .frynzy-ios-page-content,
body.dark-theme #frynzyPlaylistSetupPage .frynzy-ios-page-content,
.dark-theme #frynzyPlaylistSetupPage .frynzy-ios-page-content,
body.dark-theme #frynzyImportMusicPage .frynzy-ios-page-content,
.dark-theme #frynzyImportMusicPage .frynzy-ios-page-content {
    background: #0b1120 !important;
    background-color: #0b1120 !important;
    color: #ffffff !important;
}

body.dark-theme #frynzySetupTracksContainer,
.dark-theme #frynzySetupTracksContainer {
    background: transparent !important;
    background-color: transparent !important;
}

body.dark-theme #frynzySetupTracksContainer .frynzy-audio-row,
body.dark-theme .frynzy-audio-row,
.dark-theme #frynzySetupTracksContainer .frynzy-audio-row,
.dark-theme .frynzy-audio-row {
    background: rgba(255, 255, 255, 0.08) !important;
    background-color: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}
body.dark-theme #frynzySetupTracksContainer .frynzy-audio-row.selected,
body.dark-theme .frynzy-audio-row.selected {
    background: rgba(0, 122, 255, 0.22) !important;
    border: 1.5px solid #007aff !important;
}
body.dark-theme .frynzy-audio-title,
.dark-theme .frynzy-audio-title {
    color: #ffffff !important;
    font-weight: 600 !important;
}
body.dark-theme .frynzy-audio-sub,
.dark-theme .frynzy-audio-sub {
    color: #94a3b8 !important;
}
body.dark-theme .frynzy-audio-thumb,
.dark-theme .frynzy-audio-thumb {
    background: rgba(255, 255, 255, 0.10) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
}
body.dark-theme .frynzy-playlist-search-wrap,
.dark-theme .frynzy-playlist-search-wrap {
    background: rgba(255, 255, 255, 0.08) !important;
    background-color: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}
body.dark-theme .frynzy-playlist-search-input,
.dark-theme .frynzy-playlist-search-input {
    color: #ffffff !important;
    background: transparent !important;
}
body.dark-theme .frynzy-playlist-search-input::placeholder,
.dark-theme .frynzy-playlist-search-input::placeholder {
    color: #94a3b8 !important;
}
body.dark-theme .frynzy-playlist-search-icon,
.dark-theme .frynzy-playlist-search-icon {
    color: #94a3b8 !important;
}
body.dark-theme .frynzy-playlist-search-clear,
.dark-theme .frynzy-playlist-search-clear {
    color: #94a3b8 !important;
}

#frynzyPlaylistSetupPage.active,
#frynzyPlaylistSetupPage[style*="display: flex"],
#frynzyPlaylistSetupPage[style*="display: block"],
#frynzyImportMusicPage.active,
#frynzyImportMusicPage[style*="display: flex"],
#frynzyImportMusicPage[style*="display: block"] {
    display: flex !important;
    flex-direction: column !important;
}

/* Header Action Buttons - Simple, Minimalist & White like iPhone */
body:not(.dark-theme) #frynzySetupAddBtn,
body:not(.dark-theme) #frynzySetupSaveBtn,
body:not(.dark-theme) #frynzySetupProToolsBtn,
body:not(.dark-theme) #frynzySetupBatchMenuBtn {
    background: rgba(0, 0, 0, 0.05) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    color: #007aff !important;
}
body:not(.dark-theme) #frynzySetupAddBtn i,
body:not(.dark-theme) #frynzySetupSaveBtn i,
body:not(.dark-theme) #frynzySetupProToolsBtn i,
body:not(.dark-theme) #frynzySetupBatchMenuBtn i {
    color: #007aff !important;
}

body.dark-theme #frynzySetupAddBtn,
body.dark-theme #frynzySetupSaveBtn,
body.dark-theme #frynzySetupProToolsBtn,
body.dark-theme #frynzySetupBatchMenuBtn,
.dark-theme #frynzySetupAddBtn,
.dark-theme #frynzySetupSaveBtn,
.dark-theme #frynzySetupProToolsBtn,
.dark-theme #frynzySetupBatchMenuBtn,
body.dark-theme .frynzy-ios-header-btn,
.dark-theme .frynzy-ios-header-btn {
    background: rgba(255, 255, 255, 0.10) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
    box-shadow: none !important;
}
body.dark-theme #frynzySetupAddBtn i,
body.dark-theme #frynzySetupSaveBtn i,
body.dark-theme #frynzySetupProToolsBtn i,
body.dark-theme #frynzySetupBatchMenuBtn i,
.dark-theme #frynzySetupAddBtn i,
.dark-theme #frynzySetupSaveBtn i,
.dark-theme #frynzySetupProToolsBtn i,
.dark-theme #frynzySetupBatchMenuBtn i,
body.dark-theme .frynzy-ios-header-btn i,
.dark-theme .frynzy-ios-header-btn i {
    color: #ffffff !important;
}