﻿/**
 * ============================================================================
 * FRYNZY SYNCHRONIZED LYRICS STYLES (PAROLES LRC)
 * ============================================================================
 * • Lecteur Audio : Visualiseur 3 lignes ultra-fluide avec opacités progressives
 * • Header Lecteur : Bouton Paroles en haut à gauche
 * • Page Paroles Plein Écran : Défilement synchronisé, colonne active mise en valeur
 * • Modales & Feuilles d'édition : Décalage temporel + Correction des mots
 * • Bouton coche blanche (✓) d'enregistrement
 * • Conçu pour une fluidité 60 fps sur téléphones 1 Go à 2 Go de RAM
 * ============================================================================
 */

/* ─── 1. BOUTON PAROLES DANS LE HEADER DU LECTEUR AUDIO ─── */
.fap-header-row {
    width: min(94vw, 780px);
    max-width: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px 10px 8px;
    box-sizing: border-box;
    z-index: 10;
}

.fap-header-lyrics-btn {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    user-select: none;
    pointer-events: auto !important;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.fap-header-lyrics-btn:active {
    transform: scale(0.94);
    background: rgba(255, 255, 255, 0.22);
}

.fap-header-lyrics-btn svg {
    flex-shrink: 0;
    pointer-events: none;
}

.fap-header-close-btn,
.fap-center-close-btn {
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #ffffff;
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: transform 0.2s, background 0.2s;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    user-select: none;
    pointer-events: auto !important;
    touch-action: manipulation;
}

.fap-header-close-btn:active,
.fap-center-close-btn:active {
    transform: scale(0.92);
    background: rgba(255, 255, 255, 0.28);
}

/* ─── 2. VISUALISEUR 3 LIGNES INTÉGRÉ AU LECTEUR AUDIO ─── */
.fap-lyrics-3lines-box {
    width: min(92vw, 750px) !important;
    min-height: 68px !important;
    height: 72px !important;
    flex-shrink: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 4px auto 6px auto !important;
    padding: 3px 12px !important;
    box-sizing: border-box !important;
    cursor: pointer !important;
    overflow: hidden !important;
    position: relative !important;
    user-select: none !important;
    -webkit-tap-highlight-color: transparent !important;
    border-radius: 15px !important;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25) !important;
    transition: background 0.25s, transform 0.2s !important;
    contain: layout style !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
    z-index: 15 !important;
}

.fap-lyrics-3lines-box:active {
    transform: scale(0.985);
    background: rgba(255, 255, 255, 0.08);
}

.fap-lyrics-line {
    width: 100%;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1),
                opacity 0.32s cubic-bezier(0.2, 0.8, 0.2, 1),
                color 0.32s ease;
    will-change: transform, opacity;
    box-sizing: border-box;
    padding: 0 4px;
    pointer-events: none;
}

/* Colonne 1 : Phrase précédente montant vers le haut avec opacité faible (45%) */
.fap-lyrics-line-prev {
    font-size: 0.84rem !important;
    line-height: 1.25 !important;
    color: rgba(255, 255, 255, 0.45) !important;
    opacity: 0.45 !important;
    min-height: 18px !important;
    height: 18px !important;
    transform: translateY(0) !important;
    font-weight: 400 !important;
}

/* Colonne 2 : Phrase active, texte blanc pur (#ffffff), opacité 100% */
.fap-lyrics-line-current {
    font-size: 1.05rem !important;
    line-height: 1.3 !important;
    color: #ffffff !important;
    opacity: 1 !important;
    min-height: 26px !important;
    height: 26px !important;
    font-weight: 700 !important;
    letter-spacing: -0.2px !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5), 0 0 16px rgba(255, 255, 255, 0.3) !important;
    transform: scale(1.02) !important;
}

/* Colonne 3 : Phrase suivante avec opacité faible équivalente (45%) */
.fap-lyrics-line-next {
    font-size: 0.84rem !important;
    line-height: 1.25 !important;
    color: rgba(255, 255, 255, 0.45) !important;
    opacity: 0.45 !important;
    min-height: 18px !important;
    height: 18px !important;
    transform: translateY(0) !important;
    font-weight: 400 !important;
}

/* ─── 3. PAGE PAROLES PLEIN ÉCRAN (MODALE PLEIN ÉCRAN) ─── */
.frynzy-lyrics-modal {
    position: fixed;
    inset: 0;
    z-index: 10000985 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    display: flex;
    flex-direction: column;
    background: #09080e;
    overflow: hidden;
    animation: lyricsFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes lyricsFadeIn {
    from { opacity: 0; transform: translateY(24px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.frynzy-lyrics-backdrop {
    position: absolute;
    inset: -30px;
    background-size: cover;
    background-position: center;
    filter: blur(55px) brightness(0.32) saturate(160%);
    -webkit-filter: blur(55px) brightness(0.32) saturate(160%);
    transform: scale(1.15);
    z-index: 1;
    pointer-events: none;
}

.frynzy-lyrics-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 30%, rgba(20, 16, 32, 0.5) 0%, rgba(9, 8, 14, 0.92) 80%);
    z-index: 2;
    pointer-events: none;
}

.frynzy-lyrics-container {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    padding: calc(var(--sat, 36px) + 8px) 16px 0 16px !important;
    box-sizing: border-box;
}

/* En-tête de la Page Paroles */
.frynzy-lyrics-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
    flex-shrink: 0;
}

.frynzy-lyrics-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.frynzy-lyrics-btn {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: transform 0.2s, background 0.2s;
    flex-shrink: 0;
}

.frynzy-lyrics-btn:active {
    transform: scale(0.92);
    background: rgba(255, 255, 255, 0.25);
}

.frynzy-lyrics-header-titles {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.frynzy-lyrics-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.3px;
    line-height: 1.2;
}

.frynzy-lyrics-track-info {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.frynzy-lyrics-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Bouton Modifier */
.frynzy-lyrics-edit-btn {
    border-radius: 20px !important;
    width: auto !important;
    padding: 8px 16px;
    gap: 8px;
    font-size: 0.88rem;
    font-weight: 600;
}

/* Bouton Coche Blanche (✓) d'enregistrement immédiat */
.frynzy-lyrics-save-btn {
    background: #ffffff !important;
    color: #0f172a !important;
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 900;
    box-shadow: 0 4px 18px rgba(255, 255, 255, 0.45);
    transition: transform 0.2s, box-shadow 0.2s;
    animation: saveBtnPulse 1.2s infinite alternate ease-in-out;
}

.frynzy-lyrics-save-btn:active {
    transform: scale(0.92);
}

@keyframes saveBtnPulse {
    from { transform: scale(1); box-shadow: 0 4px 14px rgba(255, 255, 255, 0.35); }
    to { transform: scale(1.06); box-shadow: 0 6px 24px rgba(255, 255, 255, 0.65); }
}

/* Bandeau indicatif de décalage ou mode édition — Masqué pour pureté visuelle */
.frynzy-lyrics-status-banner {
    display: none !important;
}

/* ─── 4. LISTE COLONNE PAR COLONNE DES PAROLES ─── */
.frynzy-lyrics-list-wrap {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 0 10px;
    box-sizing: border-box;
    scroll-behavior: smooth;
    /* Isolate paint and scroll */
    contain: layout style;
}

.frynzy-lyrics-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-width: 650px;
    margin: 0 auto;
    /* Marges hautes et basses généreuses pour permettre un centrage parfait de la 1ère et dernière ligne */
    padding-top: calc(40vh - 50px) !important;
    padding-bottom: calc(45vh - 50px) !important;
    box-sizing: border-box;
}

/* Colonne / Ligne individuelle — Zéro tremblement, layout parfaitement stable */
.frynzy-lyric-row {
    position: relative;
    padding: 10px 16px;
    border-radius: 14px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: opacity 0.3s cubic-bezier(0.2, 0.8, 0.2, 1),
                background-color 0.3s cubic-bezier(0.2, 0.8, 0.2, 1),
                border-color 0.3s cubic-bezier(0.2, 0.8, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    opacity: 0.35;
    transform: translateZ(0);
    contain: layout style;
    will-change: opacity, background-color;
    box-sizing: border-box;
}

.frynzy-lyric-row:active {
    opacity: 0.75;
}

.frynzy-lyric-text {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.65);
    letter-spacing: -0.15px;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    word-break: break-word;
}

/* Colonne en train de jouer : Transition fluide et élégante sans saut de hauteur ni tremblement */
.frynzy-lyric-row.active {
    opacity: 1 !important;
    transform: translateZ(0) !important;
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 255, 255, 0.22) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.28) !important;
    border-radius: 14px !important;
    padding: 10px 16px !important;
}

/* Suppression définitive de la barre blanche verticale */
.frynzy-lyric-row.active::before {
    display: none !important;
    content: none !important;
}

.frynzy-lyric-row.active .frynzy-lyric-text {
    color: #ffffff !important;
    font-weight: 700 !important;
    text-shadow: 0 0 16px rgba(255, 255, 255, 0.4);
}

/* Mode Édition de mots */
.frynzy-lyric-text.editable {
    outline: none;
    cursor: text;
    user-select: text;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.35);
    padding-bottom: 2px;
}

.frynzy-lyric-row.editing-focus {
    opacity: 1;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.frynzy-lyric-row.editing-focus .frynzy-lyric-text {
    color: #ffffff;
}

/* État vide / Chargement : Paroles */
.frynzy-lyrics-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 280px;
    text-align: center;
    padding: 24px;
    box-sizing: border-box;
}

.frynzy-lyrics-empty-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 16px;
}

.frynzy-lyrics-spinner-circle {
    animation: frynzyLyricsSpin 1s linear infinite;
}

@keyframes frynzyLyricsSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.frynzy-lyrics-empty-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
}

.frynzy-lyrics-empty-desc {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.55);
    max-width: 320px;
    line-height: 1.4;
    margin-bottom: 20px;
}

.frynzy-lyrics-empty-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 6px;
    z-index: 10;
}

.frynzy-lyrics-search-now-btn {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #ffffff;
    border: none;
    border-radius: 24px;
    padding: 11px 22px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 18px rgba(99, 102, 241, 0.45);
    transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.2s;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.frynzy-lyrics-search-now-btn:active {
    transform: scale(0.94);
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
}

.frynzy-lyrics-retry-btn {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 24px;
    padding: 11px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform 0.2s, background 0.2s;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.frynzy-lyrics-retry-btn:active {
    transform: scale(0.94);
    background: rgba(255, 255, 255, 0.26);
}

/* ─── 5. TIMELINE / CONTRÔLES EN BAS DE LA PAGE PAROLES (ANCRAGE SOLIDE & ZÉRO VIDE) ─── */
.frynzy-lyrics-bottom-bar {
    position: relative !important;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 18px 14px 18px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.12) !important;
    flex-shrink: 0 !important;
    background: rgba(10, 8, 16, 0.94) !important;
    backdrop-filter: blur(28px) saturate(190%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(190%) !important;
    margin: 0 -16px 0 -16px !important;
    width: calc(100% + 32px) !important;
    max-width: none !important;
    box-sizing: border-box !important;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.65) !important;
    z-index: 25 !important;
}

.frynzy-lyrics-progress-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.6);
    font-variant-numeric: tabular-nums;
}

.frynzy-lyrics-progress-wrap input[type="range"] {
    flex: 1;
    -webkit-appearance: none;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.25);
    outline: none;
    cursor: pointer;
}

.frynzy-lyrics-progress-wrap input[type="range"]::-webkit-slider-thumb {
    -webkit-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-lyrics-playback-ctrls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.frynzy-lyrics-ctrl-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.75);
    font-size: 1.15rem;
    cursor: pointer;
    padding: 6px;
    transition: color 0.2s, transform 0.2s;
}

.frynzy-lyrics-ctrl-btn:active {
    transform: scale(0.9);
    color: #ffffff;
}

.frynzy-lyrics-play-btn {
    background: #ffffff;
    color: #0f172a;
    border: none;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s;
}

.frynzy-lyrics-play-btn:active {
    transform: scale(0.92);
}

/* ─── 6. FEUILLE & MODALES DE MODIFICATION (FOND BLANC, BOUTONS NOIRS, ICÔNES GRISES) ─── */
.frynzy-lyrics-sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10001050 !important;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: sheetFade 0.22s ease-out;
}

@keyframes sheetFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.frynzy-lyrics-sheet-card {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    background: rgba(22, 18, 34, 0.90) !important;
    backdrop-filter: blur(32px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(32px) saturate(200%) !important;
    color: #ffffff !important;
    border-top-left-radius: 28px !important;
    border-top-right-radius: 28px !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-bottom: none !important;
    padding: 20px 22px max(24px, env(safe-area-inset-bottom, 24px)) 22px !important;
    box-sizing: border-box !important;
    box-shadow: 0 -14px 45px rgba(0, 0, 0, 0.7) !important;
    display: flex !important;
    flex-direction: column !important;
    animation: sheetSlideUp 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

@keyframes sheetSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.frynzy-lyrics-sheet-handle {
    width: 42px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.35) !important;
    margin: 0 auto 16px auto;
}

.frynzy-lyrics-sheet-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff !important;
    margin-bottom: 6px;
    letter-spacing: -0.2px;
}

.frynzy-lyrics-sheet-desc {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.70) !important;
    line-height: 1.45;
    margin-bottom: 20px;
}

.frynzy-lyrics-sheet-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.frynzy-lyrics-sheet-opt {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    border-radius: 18px !important;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    user-select: none;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
}

.frynzy-lyrics-sheet-opt:active {
    background: rgba(255, 255, 255, 0.15) !important;
    transform: scale(0.985);
}

.frynzy-sheet-opt-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px !important;
    background: rgba(255, 255, 255, 0.14) !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    color: #ffffff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.frynzy-sheet-opt-info {
    flex: 1;
    min-width: 0;
}

.frynzy-sheet-opt-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: #ffffff !important;
    margin-bottom: 2px;
}

.frynzy-sheet-opt-sub {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.65) !important;
    line-height: 1.35;
}

.frynzy-sheet-opt-arrow {
    color: rgba(255, 255, 255, 0.5) !important;
    font-size: 0.85rem;
}

.frynzy-sheet-cancel-btn {
    width: 100%;
    padding: 14px;
    border-radius: 18px !important;
    background: rgba(255, 255, 255, 0.10) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    color: rgba(255, 255, 255, 0.90) !important;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.frynzy-sheet-cancel-btn:active {
    background: rgba(255, 255, 255, 0.20) !important;
    transform: scale(0.98);
}

/* Modale de réglage Décalage (Offset Stepper Style iPhone Glass) */
.frynzy-offset-stepper-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 26px !important;
    padding: 14px 20px !important;
    margin-bottom: 22px !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
}

.frynzy-offset-btn {
    width: 54px !important;
    height: 54px !important;
    min-width: 54px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.18) !important;
    border: 1px solid rgba(255, 255, 255, 0.30) !important;
    color: #ffffff !important;
    font-size: 1.3rem !important;
    cursor: pointer;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: transform 0.12s, background 0.15s;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35) !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    touch-action: none !important;
}

.frynzy-offset-btn:active {
    transform: scale(0.91) !important;
    background: rgba(255, 255, 255, 0.32) !important;
}

.frynzy-offset-display {
    font-size: 1.85rem !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 14px rgba(255, 255, 255, 0.45) !important;
    text-align: center;
}

.frynzy-offset-quick-presets {
    display: none !important;
}

.frynzy-offset-actions-row {
    display: flex;
    gap: 12px;
}

.frynzy-offset-action-cancel {
    flex: 1;
    padding: 14px;
    background: rgba(255, 255, 255, 0.10) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    color: rgba(255, 255, 255, 0.85) !important;
    border-radius: 18px !important;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    backdrop-filter: blur(16px);
}

.frynzy-offset-action-cancel:active {
    background: rgba(255, 255, 255, 0.18) !important;
    transform: scale(0.98);
}

.frynzy-offset-action-save {
    flex: 2;
    padding: 14px;
    background: rgba(255, 255, 255, 0.22) !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    color: #ffffff !important;
    border-radius: 18px !important;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 22px rgba(255, 255, 255, 0.22) !important;
    transition: background 0.2s, transform 0.15s;
    backdrop-filter: blur(20px);
}

.frynzy-offset-action-save:active {
    transform: scale(0.98);
    background: rgba(255, 255, 255, 0.32) !important;
}

/* Toast de notification */
.frynzy-lyrics-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(30px);
    background: #0f172a;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 0.88rem;
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
    z-index: 10000995 !important;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
}

.frynzy-lyrics-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ─── 7. MODALES DE FEEDBACK & CORRECTION STYLE IPHONE ─── */
.frynzy-lyrics-feedback-btn {
    width: 38px !important;
    height: 38px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: transform 0.2s, background 0.2s !important;
}

.frynzy-lyrics-feedback-btn:active {
    transform: scale(0.92);
    background: rgba(255, 255, 255, 0.22) !important;
}

.frynzy-feedback-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 4px;
}

.frynzy-sheet-close-x {
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.20) !important;
    color: #ffffff !important;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    transition: transform 0.15s, background 0.15s;
    backdrop-filter: blur(12px);
}

.frynzy-sheet-close-x:active {
    transform: scale(0.9);
    background: rgba(255, 255, 255, 0.22) !important;
}

.ios-icon-tint {
    background: rgba(255, 255, 255, 0.14) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
}

/* Formulaire de recherche sécurisé */
.frynzy-mismatch-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 16px;
}

.frynzy-mismatch-input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.frynzy-mismatch-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8) !important;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.frynzy-mismatch-field-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.frynzy-mismatch-field-icon {
    position: absolute;
    left: 14px;
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 0.95rem;
    pointer-events: none;
}

.frynzy-mismatch-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.10) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.20) !important;
    border-radius: 18px !important;
    padding: 13px 14px 13px 40px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #ffffff !important;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
    -webkit-appearance: none;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.frynzy-mismatch-input:focus {
    border-color: rgba(255, 255, 255, 0.45) !important;
    background: rgba(255, 255, 255, 0.16) !important;
}

.frynzy-mismatch-counter {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.5) !important;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.frynzy-mismatch-search-btn {
    background: rgba(255, 255, 255, 0.20) !important;
    border: 1px solid rgba(255, 255, 255, 0.32) !important;
    color: #ffffff !important;
    border-radius: 18px !important;
    padding: 14px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35) !important;
    transition: transform 0.15s, opacity 0.2s;
    animation: searchBtnPopIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(20px);
}

.frynzy-mismatch-search-btn:active {
    transform: scale(0.98);
    background: rgba(255, 255, 255, 0.30) !important;
}

@keyframes searchBtnPopIn {
    from { opacity: 0; transform: translateY(8px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Spinner de chargement */
.frynzy-mismatch-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    color: rgba(255, 255, 255, 0.75) !important;
    font-size: 0.88rem;
    font-weight: 600;
}

.frynzy-spinner-circle-sm {
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(255, 255, 255, 0.25);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: mismatchSpin 0.7s linear infinite;
}

@keyframes mismatchSpin {
    to { transform: rotate(360deg); }
}

/* Zone de résultat */
.frynzy-mismatch-result-wrap {
    margin-top: 14px;
    animation: sheetFade 0.25s ease-out;
}

.frynzy-mismatch-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 16px;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px dashed rgba(255, 255, 255, 0.25) !important;
    border-radius: 18px;
}

.frynzy-mismatch-empty-icon {
    font-size: 1.8rem;
    color: rgba(255, 255, 255, 0.6) !important;
    margin-bottom: 8px;
}

.frynzy-mismatch-empty-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff !important;
    margin-bottom: 4px;
}

.frynzy-mismatch-empty-desc {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.65) !important;
    line-height: 1.4;
    max-width: 320px;
}

/* Carte résultat avec les 4 premières lignes */
.frynzy-mismatch-found-card {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.22) !important;
    border-radius: 20px;
    padding: 16px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 12px;
    backdrop-filter: blur(20px);
}

.frynzy-mismatch-found-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14) !important;
}

.frynzy-mismatch-found-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.frynzy-mismatch-found-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #ffffff !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.frynzy-mismatch-found-artist {
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.65) !important;
    margin-top: 2px;
}

.frynzy-mismatch-badge {
    background: rgba(34, 197, 94, 0.25) !important;
    color: #4ade80 !important;
    border: 1px solid rgba(74, 222, 128, 0.4) !important;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 4px 9px;
    border-radius: 12px;
    letter-spacing: 0.2px;
    flex-shrink: 0;
}

.frynzy-mismatch-preview-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.75) !important;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.frynzy-mismatch-4lines-box {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 16px !important;
    padding: 12px 14px;
}

.frynzy-mismatch-line-item {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: 0.88rem;
    line-height: 1.35;
    color: #ffffff !important;
    font-weight: 600;
}

.frynzy-mismatch-line-item .mismatch-num {
    font-size: 0.72rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.5) !important;
    width: 14px;
    flex-shrink: 0;
}

.frynzy-mismatch-line-item .mismatch-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.frynzy-mismatch-actions-row {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.frynzy-mismatch-btn-cancel {
    flex: 1;
    padding: 13px;
    background: rgba(255, 255, 255, 0.10) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    color: rgba(255, 255, 255, 0.85) !important;
    border-radius: 16px;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
    backdrop-filter: blur(14px);
}

.frynzy-mismatch-btn-cancel:active {
    background: rgba(255, 255, 255, 0.18) !important;
}

.frynzy-mismatch-btn-use {
    flex: 2;
    padding: 13px;
    background: rgba(255, 255, 255, 0.22) !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    color: #ffffff !important;
    border-radius: 16px;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 18px rgba(255, 255, 255, 0.2) !important;
    transition: background 0.15s;
    backdrop-filter: blur(16px);
}

.frynzy-mismatch-btn-use:active {
    background: rgba(255, 255, 255, 0.32) !important;
}

/* ============================================================
   APPLE IPHONE LYRICS TRANSLATION & PRONUNCIATION (IPA) STYLES
   ============================================================ */

/* 1. Quick Translation Button in Header */
.frynzy-lyrics-quick-btn {
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    color: #60a5fa !important;
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
}

.frynzy-lyrics-quick-btn.active {
    background: rgba(59, 130, 246, 0.35) !important;
    border-color: #60a5fa !important;
    color: #ffffff !important;
    box-shadow: 0 0 14px rgba(96, 165, 250, 0.4) !important;
}

/* 2. Apple iOS Liquid Glass Switch Toggle */
.frynzy-apple-switch {
    width: 48px;
    height: 28px;
    background: rgba(255, 255, 255, 0.16);
    border-radius: 16px;
    position: relative;
    cursor: pointer;
    transition: background 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.25s;
    flex-shrink: 0;
    border: 1.5px solid rgba(255, 255, 255, 0.24);
    box-sizing: border-box;
    touch-action: manipulation;
}

.frynzy-apple-switch.active {
    background: #34c759 !important; /* Apple Vivid Green */
    border-color: #34c759 !important;
    box-shadow: 0 2px 10px rgba(52, 199, 89, 0.35);
}

.frynzy-apple-switch-knob {
    width: 22px;
    height: 22px;
    background: #ffffff;
    border-radius: 50%;
    position: absolute;
    top: 1.5px;
    left: 2px;
    transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
    transform: translate3d(0, 0, 0);
}

.frynzy-apple-switch.active .frynzy-apple-switch-knob {
    transform: translate3d(18px, 0, 0) !important;
}

/* 3. Network Status Pill */
.frynzy-net-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #cbd5e1;
}

.frynzy-net-status-pill.online {
    color: #34d399;
    border-color: rgba(52, 211, 153, 0.35);
    background: rgba(52, 211, 153, 0.12);
}

.frynzy-net-status-pill.offline {
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.35);
    background: rgba(248, 113, 113, 0.12);
}

.frynzy-net-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    display: inline-block;
}

/* 4. Language Selector Bar */
.frynzy-trans-lang-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 20px;
    padding: 14px 14px;
    margin: 12px 0 14px 0;
    box-sizing: border-box;
}

.frynzy-trans-lang-col {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    min-width: 0;
}

.frynzy-trans-col-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.6);
}

.frynzy-trans-source-pill {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 12px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.frynzy-trans-arrow {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.95rem;
    flex-shrink: 0;
    padding-top: 14px;
}

.frynzy-trans-target-select {
    width: 100%;
    padding: 9px 12px;
    background: rgba(22, 18, 34, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 14px;
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 700;
    outline: none;
    cursor: pointer;
    backdrop-filter: blur(20px);
    box-sizing: border-box;
}

.frynzy-trans-target-select option {
    background: #161222;
    color: #ffffff;
}

/* 5. Main Action Button (Traduire / Phonétique) */
.frynzy-trans-action-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.9), rgba(37, 99, 235, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 18px;
    color: #ffffff;
    font-size: 0.96rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(37, 99, 235, 0.35);
    transition: transform 0.18s, opacity 0.18s;
}

.frynzy-trans-action-btn:active {
    transform: scale(0.98);
    opacity: 0.9;
}

.frynzy-trans-action-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

/* 5.B. Language Pack On-Demand Download Card */
.frynzy-pron-download-box {
    margin-bottom: 12px;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(59, 130, 246, 0.45);
    border-radius: 18px;
    padding: 12px 14px;
    box-sizing: border-box;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.frynzy-pron-dl-header {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #60a5fa;
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.frynzy-pron-dl-bar-wrap {
    width: 100%;
    height: 7px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 6px;
}

.frynzy-pron-dl-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    border-radius: 6px;
    transition: width 0.12s ease;
}

.frynzy-pron-dl-sub {
    font-size: 0.76rem;
    color: #cbd5e1;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
}

/* 6. Preview Card */
.frynzy-trans-preview-box {
    margin-top: 14px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    padding: 12px 14px;
    box-sizing: border-box;
}

.frynzy-trans-preview-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.frynzy-trans-preview-lines {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 160px;
    overflow-y: auto;
}

.frynzy-trans-preview-row {
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    font-size: 0.85rem;
    line-height: 1.35;
}

.frynzy-trans-preview-orig {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.78rem;
}

.frynzy-trans-preview-trans {
    color: #a7f3d0;
    font-weight: 700;
    margin-top: 2px;
}

.frynzy-trans-preview-ipa {
    color: #38bdf8;
    font-style: italic;
    font-size: 0.78rem;
    margin-top: 2px;
}

/* 7. Lyrics Display Translation & Pronunciation Typography */
.frynzy-lyric-translation {
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(167, 243, 208, 0.9);
    margin-top: 2px;
    line-height: 1.3;
    letter-spacing: -0.1px;
    transition: color 0.2s, opacity 0.2s;
}

.frynzy-lyric-row.active .frynzy-lyric-translation {
    color: #ffffff !important;
    font-weight: 700 !important;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

.frynzy-lyric-ipa {
    font-size: 0.73rem;
    font-style: italic;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: rgba(56, 189, 248, 0.85);
    margin-top: 1px;
    line-height: 1.2;
    letter-spacing: 0.2px;
}

.frynzy-lyric-row.active .frynzy-lyric-ipa {
    color: #bae6fd !important;
    font-weight: 600 !important;
}



/* Modal search lyrics card layout & soft keyboard fluid adjustment */
#frynzyLyricsMismatchModal .frynzy-lyrics-sheet-card {
    max-height: calc(100% - 24px) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain;
}

body.keyboard-open #frynzyLyricsMismatchModal .frynzy-lyrics-sheet-card {
    max-height: calc(100% - 10px) !important;
}
