:root {
    --sat: 28px;
    --sab: 48px;
    --sal: 0px;
    --sar: 0px;
    --bg-page: #f4f6fb;
    --bg-gradient: linear-gradient(135deg, #f4f6fb 0%, #eaecf5 100%);
    --card-bg: #ffffff;
    --card-border: rgba(0, 0, 0, 0.07);
    --text-main: #1a1b2e;
    --text-muted: #6b7280;
    --accent: #ff007f;
    --accent2: #7f00ff;
    --tiktok: #ff0050;
    --instagram: #C13584;
    --twitter: #1DA1F2;
    --facebook: #1877F2;
    --pinterest: #E60023;
    --mediafire: #0070f0;
    --appvn: #388E3C;
    --apk: #00897B;
    --ringtones: #F57C00;
    --youtube: #CC0000;
    --xnxx: #e67e00;
    --xvideos: #e67e00;
    --hanime: #ff6699;
    --lyrics: #8B5CF6;
}

* {
    box-sizing: border-box;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    -webkit-tap-highlight-color: transparent;
}

/* Eliminate 300ms tap delay on all interactive elements */
button, a, [onclick], [role="button"],
.platform-btn, .format-btn, .quality-btn, .dl-btn,
.tab-btn, .nav-btn, .action-btn, .close-btn,
.history-item, .download-item {
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
}

*::-webkit-scrollbar {
    display: none !important;
    width: 0px !important;
    height: 0px !important;
    background: transparent !important;
}

html {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
    display: none !important;
    width: 0px !important;
    height: 0px !important;
    background: transparent !important;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-page);
    color: var(--text-main);
    margin: 0;
    min-height: 100vh;
    padding: 20px;
    overflow-x: hidden !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    box-sizing: border-box;
}

html,
body {
    overflow-anchor: none;
    -webkit-text-size-adjust: 100%;
}

html.modal-scroll-locked,
body.modal-scroll-locked {
    overflow: hidden !important;
    overscroll-behavior: none !important;
    touch-action: none;
}

:root {
    --sat: 28px;
    --sab: 48px;
    --sal: 0px;
    --sar: 0px;
}

.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #ff007f 0%, #7f00ff 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 20px;
    /* Ensure last cards are not hidden under the floating widget on mobile */
    padding-bottom: 90px;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 22px 18px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    box-sizing: border-box;
    min-width: 0;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.icon-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-title i {
    font-size: 1.5rem;
}

.icon-title h3 {
    margin: 0;
    font-size: 1.2rem;
}

.badge {
    background: rgba(127, 0, 255, 0.08);
    color: #7f00ff;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-search {
    background: rgba(245, 124, 0, 0.12);
    color: #F57C00;
}

.card-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
    flex-grow: 1;
    line-height: 1.5;
}

.input-area {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f0f1f8;
    padding: 4px 5px 4px 12px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: border-color 0.2s, box-shadow 0.2s;
    position: relative;
    z-index: 50;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.input-area:focus-within {
    border-color: rgba(255, 0, 127, 0.35);
    box-shadow: 0 0 0 3px rgba(255, 0, 127, 0.07);
}

.service-input {
    background: transparent;
    border: none;
    color: var(--text-main);
    padding: 8px 6px 8px 0;
    flex: 1 1 0;
    min-width: 0 !important;
    width: 0;
    outline: none;
    font-family: inherit;
    font-size: 0.92rem;
    position: relative;
    z-index: 51;
    box-sizing: border-box;
}

.service-input::placeholder {
    color: #9ca3af;
}

.btn-action {
    background: linear-gradient(135deg, #ff007f, #7f00ff);
    color: white;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(255, 0, 127, 0.3);
    /* Prevent 300ms touch delay on Android */
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    z-index: 60;
    flex-shrink: 0;
}

.btn-action:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 18px rgba(255, 0, 127, 0.4);
}

.card-youtube .icon-title i {
    color: var(--youtube);
}

.card-youtube:hover {
    border-color: var(--youtube);
}

.card-tiktok .icon-title i {
    color: var(--tiktok);
}

.card-tiktok:hover {
    border-color: var(--tiktok);
}

.card-instagram .icon-title i {
    color: var(--instagram);
}

.card-instagram:hover {
    border-color: var(--instagram);
}

.card-twitter .icon-title i {
    color: var(--twitter);
}

.card-twitter:hover {
    border-color: var(--twitter);
}

.card-facebook .icon-title i {
    color: var(--facebook);
}

.card-facebook:hover {
    border-color: var(--facebook);
}

.card-pinterest .icon-title i {
    color: var(--pinterest);
}

.card-pinterest:hover {
    border-color: var(--pinterest);
}

.card-mediafire .icon-title i {
    color: var(--mediafire);
}

.card-mediafire:hover {
    border-color: var(--mediafire);
}

.card-appvn .icon-title i {
    color: var(--appvn);
}

.card-appvn:hover {
    border-color: var(--appvn);
}

.card-apk .icon-title i {
    color: var(--apk);
}

.card-apk:hover {
    border-color: var(--apk);
}

.card-ringtones .icon-title i {
    color: var(--ringtones);
}

.card-ringtones:hover {
    border-color: var(--ringtones);
}

.card-xnxx .icon-title i {
    color: var(--xnxx);
}

.card-xnxx:hover {
    border-color: var(--xnxx);
}

.card-lyrics .icon-title i {
    color: var(--lyrics);
}

.card-lyrics:hover {
    border-color: var(--lyrics);
}

.modal {
    display: none;
    position: fixed;
    z-index: 5000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: none;
    overflow-y: auto;
    align-items: flex-start;
    justify-content: center;
    padding: 20px 0;
}

.modal[style*="display: flex"],
.modal[style*="display:flex"] {
    display: flex !important;
    flex-direction: column;
    align-items: center;
}

#batchModal {
    justify-content: center;
    align-items: flex-start;
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Mobile: always show the X button fixed at top-right */
@media (max-width: 768px) {
    #batchModal .close-batch-modal {
        position: fixed !important;
        top: 12px !important;
        right: 12px !important;
        z-index: 10001 !important;
        background: #ffffff !important;
        box-shadow: 0 2px 12px rgba(0,0,0,0.18) !important;
    }
    #batchModal .modal-content {
        margin-top: 56px !important;
        margin-bottom: 24px !important;
        width: 96% !important;
        padding: 24px 18px 24px 18px !important;
    }
}

#resultModal .modal-content {
    background-color: #ffffff;
    margin: 20px auto;
    padding: 32px 28px 24px;
    border-radius: 24px;
    width: 92%;
    max-width: 760px;
    /* 100dvh tient compte de la barre Safari mobile qui apparaît/disparaît */
    max-height: calc(100dvh - 40px - var(--sat) - var(--sab));
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.07);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.18);
    animation: slideDown 0.3s ease;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

#resultModal .result-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 6px;
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
}

#resultModal .close-modal {
    z-index: 3;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    cursor: pointer;
    color: #9ca3af;
}

.close-modal:hover {
    color: #ff007f;
}

.preview-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.preview-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

.actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-dl {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity 0.2s;
}

.btn-dl:hover {
    opacity: 0.9;
}

.btn-dl:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* "Download launched" feedback state */
.btn-dl:disabled.btn-launched {
    opacity: 0.8 !important;
    background: linear-gradient(135deg, #00c853, #00897b) !important;
    box-shadow: 0 0 14px rgba(0, 200, 83, 0.4);
}

.btn-video, .btn-audio {
    background: rgba(120, 120, 128, 0.16) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    color: var(--text-main) !important;
    border-radius: 20px !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06) !important;
    font-weight: 600;
}

.btn-video i, .btn-audio i {
    color: #8e8e93 !important;
    margin-right: 6px;
}

.btn-video:active, .btn-audio:active {
    background: rgba(0, 0, 0, 0.15) !important;
    transform: scale(0.96) !important;
}

.video-desc {
    margin-top: 10px;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.4;
}

.video-tags {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.tag {
    background: rgba(127, 0, 255, 0.08);
    color: #7f00ff;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 500;
    border: 1px solid rgba(127, 0, 255, 0.15);
}

.loader {
    border: 4px solid #e5e7eb;
    border-top: 4px solid #ff007f;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
    display: none;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.error-message {
    color: #dc2626;
    text-align: center;
    display: none;
    padding: 10px;
    background: rgba(220, 38, 38, 0.07);
    border-radius: 8px;
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.back-link {
    display: block;
    text-align: center;
    margin-top: 40px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
}

.back-link:hover {
    color: #ff007f;
}

@media (max-width: 600px) {
    .preview-container {
        flex-direction: column;
        text-align: center;
    }

    .actions {
        flex-direction: column;
    }

    .btn-dl {
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================================================
   FLOATING DOWNLOAD MANAGER WIDGET
   ========================================================================== */
.download-manager-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 2000;
    font-family: 'Outfit', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.download-manager-widget.hide-on-keyboard {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(100px) !important;
}

.widget-collapsed-btn, .widget-panel {
    pointer-events: auto;
}

.widget-collapsed-btn {
    width: 66px;
    height: 66px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff007f 0%, #7f00ff 100%);
    border: 2px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: none;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s, border-color 0.3s;
}

.widget-collapsed-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 35px rgba(255, 0, 127, 0.25), 0 10px 30px rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 255, 255, 0.2);
}

.widget-icon-container {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.widget-icon-container i {
    font-size: 20px;
    color: #fff;
    transition: transform 0.3s;
}

@keyframes downloadPulse {
    0% { transform: translateY(-2px); }
    50% { transform: translateY(2px); }
    100% { transform: translateY(-2px); }
}

.download-manager-widget.active .widget-icon-container i {
    animation: downloadPulse 1.5s infinite ease-in-out;
}

.badge-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: linear-gradient(135deg, #ff007f 0%, #7f00ff 100%);
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 11px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring__circle {
    transition: stroke-dashoffset 0.35s;
    transform-origin: 50% 50%;
}

.widget-panel {
    width: 360px;
    max-height: 480px;
    background: rgba(26, 28, 41, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    backdrop-filter: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s;
    transform-origin: bottom right;
}

.download-manager-widget.collapsed .widget-panel {
    transform: scale(0);
    opacity: 0;
    pointer-events: none;
    height: 0;
    width: 0;
}

.download-manager-widget.expanded .widget-panel {
    transform: scale(1);
    opacity: 1;
    pointer-events: auto;
}

.download-manager-widget.expanded .widget-collapsed-btn {
    display: none;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.panel-title-container {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
}

.panel-title-container i {
    font-size: 16px;
    background: linear-gradient(135deg, #ff007f 0%, #7f00ff 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.panel-title-container h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}

.panel-action-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

.panel-action-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 400px;
}

.panel-body::-webkit-scrollbar {
    width: 6px;
}

.panel-body::-webkit-scrollbar-track {
    background: transparent;
}

.panel-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.empty-downloads-msg {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
    color: var(--text-muted);
    text-align: center;
}

.empty-downloads-msg i {
    font-size: 36px;
    margin-bottom: 12px;
    opacity: 0.3;
}

.empty-downloads-msg p {
    margin: 0;
    font-size: 13px;
}

.download-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 12px 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: border-color 0.2s, background 0.2s;
}

.download-item:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 0, 127, 0.2);
}

.download-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.download-item-info {
    flex: 1;
    min-width: 0;
}

.download-item-title {
    margin: 0 0 2px 0;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.download-item-meta {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.download-item-meta i {
    font-size: 10px;
}

.download-item-cancel {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
    padding: 0 2px;
    transition: color 0.2s;
    line-height: 1;
}

.download-item-cancel:hover {
    color: #ff4444;
}

.download-progress-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.download-progress-bar-bg {
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.download-progress-bar-fill {
    height: 100%;
    background: linear-gradient(to right, #ff007f, #7f00ff);
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
}

.download-progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(
        90deg,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.15) 50%,
        rgba(255,255,255,0) 100%
    );
    animation: progressShine 1.5s infinite;
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.download-metrics {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
}

.download-metric-percentage {
    font-weight: 600;
    color: #ff007f;
}

.download-metric-size {
    text-align: right;
}

.download-status-text {
    font-size: 11px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.download-status-text.completed {
    color: #00e676;
}

.download-status-text.processing {
    color: #00e5ff;
}

.download-status-text.failed {
    color: #ff3d00;
}

/* ==========================================================================
   HAMBURGER BUTTON & FRYNZYFLIX DESKTOP FLOATING BUTTONS (Obsolètes, remplacés par la top-bar unifiée)
   ========================================================================== */
.hamburger-btn,
.btn-frynzyflix-nav.desktop-frynzyflix-btn {
    display: none !important;
}

.frynzyflix-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.6));
}

.frynzyflix-live-dot {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    border: 1.5px solid #0f172a;
    box-shadow: 0 0 8px #ef4444;
    animation: livePulseFlix 2s infinite;
}

@keyframes livePulseFlix {
    0% { transform: scale(0.85); opacity: 0.8; }
    50% { transform: scale(1.25); opacity: 1; box-shadow: 0 0 12px #ef4444; }
    100% { transform: scale(0.85); opacity: 0.8; }
}

.frynzyflix-tooltip {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
    font-size: 0.76rem;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 9px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
    letter-spacing: 0.3px;
    z-index: 3001;
}

.btn-frynzyflix-nav.desktop-frynzyflix-btn:hover .frynzyflix-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Mobile top bar buttons */
.mobile-frynzyflix-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #0f172a;
    border: 1px solid rgba(255, 0, 127, 0.4);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    padding: 0;
    margin: 0;
    text-decoration: none;
    cursor: pointer;
    flex-shrink: 0;
}

.mobile-frynzyflix-btn .frynzyflix-icon-inner {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-anizy-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #0f172a;
    border: 1px solid rgba(139, 92, 246, 0.4);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    padding: 0;
    margin: 0;
    text-decoration: none;
    cursor: pointer;
    flex-shrink: 0;
}

.mobile-anizy-btn .anizy-icon-inner {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.anizy-svg {
    width: 100%;
    height: 100%;
}

.anizy-live-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 7px;
    height: 7px;
    background: #8b5cf6;
    border-radius: 50%;
    border: 1.5px solid #ffffff;
}

@media (max-width: 768px) {
    .desktop-frynzyflix-btn {
        display: none !important;
    }
}


/* ==========================================================================
   SIDEBAR
   ========================================================================== */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: none;
    z-index: 3500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.sidebar-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.main-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 310px;
    height: 100%;
    background: #ffffff;
    border-right: 2px solid rgba(0, 0, 0, 0.08);
    z-index: 4000;
    display: flex;
    flex-direction: column;
    padding: 30px 0 30px 0;
    transform: translateX(-120%);
    transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, visibility 0.3s ease;
    box-shadow: none;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    overflow-y: auto;
}

.main-sidebar.open {
    transform: translateX(0);
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    box-shadow: 10px 0 40px rgba(0, 0, 0, 0.12);
}

/* Close button inside sidebar */
.sidebar-close-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s, color 0.2s;
}

.sidebar-close-btn:hover {
    background: rgba(255, 0, 127, 0.2);
    color: #fff;
}

/* Profile section */
.sidebar-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 24px 28px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    position: relative;
}

.profile-avatar-wrapper {
    position: relative;
    width: 84px;
    height: 84px;
    margin-bottom: 14px;
}

.profile-avatar {
    position: relative;
    z-index: 2;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 0, 127, 0.6);
    box-shadow: 0 0 0 4px rgba(255, 0, 127, 0.1), 0 8px 24px rgba(0,0,0,0.1);
}

.profile-avatar-ring {
    position: absolute;
    z-index: 1;
    inset: -5px;
    border-radius: 50%;
    border: 2px solid transparent;
    background: linear-gradient(#ffffff, #ffffff) padding-box,
                linear-gradient(135deg, #ff007f, #7f00ff) border-box;
    animation: rotateBorder 4s linear infinite;
}

@keyframes rotateBorder {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.profile-name {
    margin: 0 0 4px 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    text-align: center;
}

.profile-email {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
}

/* Stats section */
.sidebar-stats {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.stat-card {
    background: rgba(255, 0, 127, 0.08);
    border: 1px solid rgba(255, 0, 127, 0.18);
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-card > i {
    font-size: 1.6rem;
    background: linear-gradient(135deg, #ff007f, #7f00ff);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(to right, #ff007f, #7f00ff);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* Nav items */
.sidebar-nav {
    padding: 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 16px;
    border-radius: 14px;
    cursor: pointer;
    background: transparent;
    border: none;
    color: #4b5563;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, transform 0.15s;
    text-align: left;
    width: 100%;
}

.sidebar-nav-item:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-main);
    transform: translateX(4px);
}

.sidebar-nav-item > i:first-child {
    font-size: 1.1rem;
    width: 22px;
    text-align: center;
    color: rgba(255, 0, 127, 0.8);
}

.sidebar-nav-item > span {
    flex: 1;
}

.sidebar-nav-arrow {
    font-size: 0.7rem;
    color: rgba(0, 0, 0, 0.25);
}

/* ==========================================================================
   SETTINGS OVERLAY
   ========================================================================== */
.settings-overlay {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: none;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.settings-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.settings-modal {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 24px;
    width: 100%;
    max-width: 640px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.18);
    transform: scale(0.92) translateY(20px);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.settings-overlay.visible .settings-modal {
    transform: scale(1) translateY(0);
}

.settings-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 28px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
}

.settings-header-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255,0,127,0.2), rgba(127,0,255,0.2));
    border: 1px solid rgba(255,0,127,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #ff007f;
    flex-shrink: 0;
}

.settings-header h2 {
    margin: 0 0 4px 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
}

.settings-header p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.settings-header > div:last-of-type {
    flex: 1;
}

.settings-close-btn {
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
}

.settings-close-btn:hover {
    background: rgba(255, 60, 60, 0.2);
    color: #ff4444;
}

.settings-body {
    overflow-y: auto;
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    flex: 1;
}

.settings-body::-webkit-scrollbar {
    width: 5px;
}

.settings-body::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 3px;
}

.settings-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.settings-section-title i {
    color: #ff007f;
    font-size: 1rem;
}

/* Quality radio cards */
.quality-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.quality-option {
    cursor: pointer;
}

.quality-option input[type="radio"] {
    display: none;
}

.quality-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 18px;
    background: #f8fafc;
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
    min-width: 70px;
}

.quality-option:hover .quality-card {
    background: rgba(255, 0, 127, 0.08);
    border-color: rgba(255, 0, 127, 0.25);
    transform: translateY(-2px);
}

.quality-option input[type="radio"]:checked + .quality-card {
    background: linear-gradient(135deg, rgba(255,0,127,0.15), rgba(127,0,255,0.15));
    border-color: #ff007f;
    box-shadow: 0 0 0 3px rgba(255, 0, 127, 0.12);
}

.quality-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
}

.quality-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 3px;
}

/* Network options */
.network-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.network-option {
    cursor: pointer;
}

.network-option input[type="radio"] {
    display: none;
}

.network-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    background: #f8fafc;
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    transition: background 0.2s, border-color 0.2s;
}

.network-option:hover .network-card {
    background: rgba(255, 0, 127, 0.06);
    border-color: rgba(255, 0, 127, 0.2);
}

.network-option input[type="radio"]:checked + .network-card {
    background: linear-gradient(135deg, rgba(255,0,127,0.12), rgba(127,0,255,0.12));
    border-color: #7f00ff;
    box-shadow: 0 0 0 3px rgba(127, 0, 255, 0.1);
}

.network-card > i {
    font-size: 1.2rem;
    width: 28px;
    text-align: center;
    background: linear-gradient(135deg, #ff007f, #7f00ff);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.network-card > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.network-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
}

.network-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* Settings footer */
.settings-footer {
    padding: 20px 28px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
}

.btn-settings-save {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #ff007f, #7f00ff);
    border: none;
    border-radius: 14px;
    color: white;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 6px 20px rgba(255, 0, 127, 0.3);
}

.btn-settings-save:hover {
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(255, 0, 127, 0.4);
}

.btn-settings-save:active {
    transform: translateY(0);
}

/* Save toast */
.settings-toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(0, 230, 118, 0.15);
    border: 1px solid rgba(0, 230, 118, 0.4);
    border-radius: 12px;
    padding: 12px 24px;
    color: #00e676;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 9999;
    backdrop-filter: none;
    pointer-events: none;
}

.settings-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Concurrency Select custom styling */
.concurrency-option-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.concurrency-help-text {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.select-wrapper {
    position: relative;
    width: 100%;
    max-width: 260px;
}

.settings-select {
    width: 100%;
    padding: 12px 18px;
    background: #f8fafc;
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.settings-select:hover {
    background: rgba(255, 0, 127, 0.08);
    border-color: rgba(255, 0, 127, 0.25);
}

.settings-select:focus {
    background: rgba(255, 0, 127, 0.08);
    border-color: #ff007f;
    box-shadow: 0 0 0 3px rgba(255, 0, 127, 0.12);
}

.select-wrapper::after {
    content: '\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(0, 0, 0, 0.45);
    pointer-events: none;
    font-size: 1rem;
    transition: color 0.2s;
}

.select-wrapper:hover::after {
    color: #ff007f;
}

.settings-select option {
    background: #ffffff;
    color: var(--text-main);
    padding: 10px;
}

/* Custom confirm hover states */
#btnCustomConfirmYes:hover {
    transform: scale(1.03);
    opacity: 0.95;
    background: #ff4d88 !important;
}
#btnCustomConfirmNo:hover {
    transform: scale(1.03);
    opacity: 0.95;
    background: #334155 !important;
}

/* Action buttons in download items (Pause, Play/Replay, Cancel) */
.download-action-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    font-size: 11px;
    padding: 6px 8px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    gap: 5px;
    font-weight: 600;
}
.download-action-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}
.download-action-btn.pause-btn:hover {
    background: rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.4);
    color: #fbbf24;
}
.download-action-btn.play-btn:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.4);
    color: #34d399;
}
.download-action-btn.cancel-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #f87171;
}

/* ==========================================================================
   FRYNZY+ SUBSCRIPTION SIDEBAR — PREMIUM REDESIGN
   ========================================================================== */
.frynzy-plus-sidebar-card {
    background: linear-gradient(135deg, #12082a 0%, #1e0b3e 50%, #2d1257 100%);
    border: 1.5px solid rgba(251, 191, 36, 0.4);
    border-radius: 16px;
    padding: 14px 16px;
    margin: 10px 14px 6px 14px;
    display: flex;
    align-items: center;
    gap: 13px;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-width: 0;
    flex-shrink: 0;
    box-shadow:
        0 6px 20px rgba(124, 58, 237, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.frynzy-plus-sidebar-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 20%;
    height: 200%;
    background: linear-gradient(
        to right, 
        rgba(255, 255, 255, 0) 0%, 
        rgba(255, 255, 255, 0.15) 30%, 
        rgba(255, 255, 255, 0.3) 50%, 
        rgba(255, 255, 255, 0.15) 70%, 
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(30deg);
    transition: none;
    pointer-events: none;
}
.frynzy-plus-sidebar-card:hover::before {
    left: 140%;
    transition: all 1.2s ease-in-out;
}
.frynzy-plus-sidebar-card:hover {
    background: linear-gradient(135deg, #2e1065 0%, #4c1d95 100%);
    border-color: rgba(245, 158, 11, 0.8);
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.35), 0 0 12px rgba(245, 158, 11, 0.2);
    transform: translateY(-2px);
}
.frynzy-plus-crown {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
    animation: crownPulse 2s infinite alternate;
}
@keyframes crownPulse {
    0% { transform: scale(1); box-shadow: 0 0 5px rgba(251, 191, 36, 0.4); }
    100% { transform: scale(1.05); box-shadow: 0 0 12px rgba(251, 191, 36, 0.7); }
}
.frynzy-plus-crown i {
    font-size: 16px;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.frynzy-plus-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}
.frynzy-plus-title {
    font-weight: 800;
    font-size: 0.95rem;
    color: #fff;
    letter-spacing: 0.5px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.frynzy-plus-subtitle {
    font-size: 0.72rem;
    font-weight: 600;
    background: linear-gradient(90deg, #fbcfe8, #fde047);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.frynzy-plus-arrow {
    font-size: 12px;
    color: #fbbf24;
    flex-shrink: 0;
    transition: transform 0.2s ease;
    text-shadow: 0 0 4px rgba(251, 191, 36, 0.4);
}
.frynzy-plus-sidebar-card:hover .frynzy-plus-arrow {
    transform: translateX(4px);
    color: #fff;
}

/* Consumption widget — compact */
.sidebar-consumption-card {
    background: #fafafa;
    border: 1px solid #f0f0f5;
    border-radius: 10px;
    padding: 9px 13px;
    margin: 4px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.consumption-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #6b7280;
    letter-spacing: 0.2px;
    text-transform: uppercase;
}
.consumption-header i {
    color: #8b5cf6;
    font-size: 11px;
}
.consumption-bars {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.consumption-bar-row {
    display: grid;
    grid-template-columns: 60px 1fr 46px;
    align-items: center;
    gap: 6px;
}
.bar-label {
    font-size: 0.68rem;
    color: #9ca3af;
}
.bar-track {
    background: #f3f4f6;
    height: 4px;
    border-radius: 2px;
    overflow: hidden;
}
.bar-fill {
    height: 100%;
    border-radius: 2px;
    width: 0%;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.bar-fill.yesterday {
    background: linear-gradient(90deg, #ec4899, #f43f5e);
}
.bar-fill.today {
    background: linear-gradient(90deg, #8b5cf6, #ec4899);
}
.bar-value {
    font-size: 0.63rem;
    font-weight: 700;
    color: #374151;
    text-align: right;
    white-space: nowrap;
}
.consumption-total-month {
    font-size: 0.63rem;
    color: #9ca3af;
    text-align: right;
    border-top: 1px solid #f3f4f6;
    padding-top: 4px;
}


/* Storage circle widget — compact */
.sidebar-storage-card {
    background: #fafafa;
    border: 1px solid #f0f0f5;
    border-radius: 10px;
    padding: 9px 13px;
    margin: 4px 14px 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.storage-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.2px;
}
.storage-header i {
    color: #ec4899;
    font-size: 11px;
}
.storage-content {
    display: flex;
    align-items: center;
    gap: 12px;
}
.storage-circle-container {
    width: 42px;
    height: 42px;
    position: relative;
    flex-shrink: 0;
}
.storage-circle {
    width: 100%;
    height: 100%;
}
.circle-bg {
    fill: none;
    stroke: #f3f4f6;
    stroke-width: 3.8;
}
.circle-fill {
    fill: none;
    stroke: url(#storageGrad);
    stroke-width: 3.8;
    stroke-linecap: round;
    transition: stroke-dasharray 0.8s ease;
}
.circle-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.62rem;
    font-weight: 800;
    color: #4c1d95;
}
.storage-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.storage-amount {
    font-size: 0.75rem;
    font-weight: 700;
    color: #1f2937;
}
.storage-limit {
    font-size: 0.64rem;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 4px;
}


/* Premium lock style */
.quality-option.premium-locked {
    position: relative;
    opacity: 0.85;
}
.quality-option.premium-locked::after {
    content: '🔒 Premium';
    position: absolute;
    top: 4px;
    right: 8px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    font-size: 8px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 10px;
    text-transform: uppercase;
}
.quality-option.premium-locked input { display: none !important; }
.quality-option.premium-locked .quality-card {
    border-color: rgba(245, 158, 11, 0.25) !important;
    background: rgba(245, 158, 11, 0.03) !important;
    cursor: not-allowed !important;
}

/* =====================================================
   PLANS MODAL — CLEAN WHITE PROFESSIONAL
   ===================================================== */
.plans-modal-overlay {
    background: rgba(10, 10, 30, 0.75) !important;
    backdrop-filter: none !important;
    align-items: flex-start !important;
    justify-content: center !important;
    overflow-y: auto !important;
}

/* Force flex-start on the actual flex container to avoid centering clip bugs on mobile */
#plansModal[style*="flex"] {
    align-items: flex-start !important;
    justify-content: flex-start !important;
}

#plansModal .modal-content {
    background: #ffffff;
    border: none;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.22);
    max-width: 920px;
    width: 95%;
    padding: 36px 32px 40px;
    border-radius: 24px;
    color: #1e1b4b;
    position: relative;
    margin: 40px auto !important;
}

#plansModal .close-modal {
    color: #9ca3af;
    font-size: 1.6rem;
    top: 16px;
    right: 20px;
}
#plansModal .close-modal:hover { color: #374151; }

/* Header strip */
#plansModal .plans-header {
    text-align: center;
    margin-bottom: 6px;
}
#plansModal .plans-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #ede9fe, #fce7f3);
    color: #7c3aed;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 4px 14px;
    border-radius: 20px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

#plansModal h2 {
    font-size: 1.75rem;
    font-weight: 900;
    color: #1e1b4b;
    margin-bottom: 6px;
    background: none;
    -webkit-text-fill-color: #1e1b4b;
    background-clip: unset;
}

#plansModal > .modal-content > p {
    color: #6b7280;
    font-size: 0.92rem;
    margin-bottom: 4px;
}

/* Plans grid */
.plans-modal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 28px;
}

@media (max-width: 700px) {
    .plans-modal-grid { grid-template-columns: 1fr; }
    #plansModal .modal-content { padding: 24px 18px 30px; }
    #plansModal h2 { font-size: 1.4rem; }
}
@media (min-width: 701px) and (max-width: 900px) {
    .plans-modal-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Individual plan card */
.plan-card {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 20px;
    padding: 24px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    position: relative;
    overflow: visible;
}
.plan-card::before { display: none; }

.plan-card:hover {
    transform: translateY(-6px);
    border-color: #8b5cf6;
    box-shadow: 0 16px 40px rgba(139, 92, 246, 0.15);
    background: #fff;
}

/* Popular badge — doesn't clip the card anymore */
.plan-card.popular {
    border-color: #8b5cf6;
    background: linear-gradient(160deg, #faf5ff 0%, #fff 100%);
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.12);
    margin-top: 0;
    padding-top: 38px;  /* make room for badge */
}
.plan-card.popular::after {
    content: '⭐ POPULAIRE';
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #7c3aed, #c026d3);
    color: white;
    font-size: 9px;
    font-weight: 900;
    padding: 5px 16px;
    border-radius: 20px;
    letter-spacing: 1px;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
}

/* Plan icon box */
.plan-icon-box {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 1.5rem;
}
.plan-icon-box.basic-icon   { background: linear-gradient(135deg, #dbeafe, #bfdbfe); color: #2563eb; }
.plan-icon-box.medium-icon  { background: linear-gradient(135deg, #ede9fe, #ddd6fe); color: #7c3aed; }
.plan-icon-box.premium-icon { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #d97706; }

.plan-name {
    font-weight: 800;
    font-size: 1.1rem;
    color: #1e1b4b;
}
.plan-desc {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: -6px;
}

.plan-price {
    font-size: 2.2rem;
    font-weight: 900;
    color: #1e1b4b;
    line-height: 1;
    background: none;
    -webkit-text-fill-color: #1e1b4b;
}
.plan-price span {
    font-size: 0.8rem;
    color: #9ca3af;
    font-weight: 500;
    -webkit-text-fill-color: #9ca3af;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
    font-size: 0.8rem;
    color: #374151;
    border-top: 1px solid #f3f4f6;
    padding-top: 12px;
}
.plan-features li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.4;
}
.plan-features li i {
    color: #10b981;
    flex-shrink: 0;
    margin-top: 2px;
    font-size: 11px;
}

/* ── Shimmer-glow button animation ── */
@keyframes glowPulse {
    0%, 100% { box-shadow: 0 4px 18px rgba(139, 92, 246, 0.35); }
    50%       { box-shadow: 0 4px 30px rgba(139, 92, 246, 0.7), 0 0 0 6px rgba(139,92,246,0.12); }
}
@keyframes shimmerSlide {
    0%   { background-position: -200% center; }
    100% { background-position:  200% center; }
}

.btn-plan-select {
    width: 100%;
    background: linear-gradient(90deg, #6d28d9 0%, #8b5cf6 25%, #ec4899 50%, #8b5cf6 75%, #6d28d9 100%);
    background-size: 200% auto;
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 13px 16px;
    font-weight: 800;
    font-size: 0.88rem;
    cursor: pointer;
    margin-top: auto;
    animation: shimmerSlide 3s linear infinite, glowPulse 2.5s ease-in-out infinite;
    letter-spacing: 0.3px;
    transition: transform 0.2s ease;
}
.btn-plan-select:hover {
    transform: translateY(-2px);
    animation-duration: 1.2s, 1s;
}
.btn-plan-select:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    animation: none;
    background: #c4b5fd;
}
/* =====================================================
   ADSTERRA REAL AD MODAL (CLEAN, DIRECT, RESPONSIVE)
   ===================================================== */
.ad-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(4, 9, 24, 0.88);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    z-index: 10005;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: alertBgIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.ad-modal-card {
    background: #0f172a;
    background: linear-gradient(155deg, #0b1120 0%, #161a2e 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
    border-radius: 20px;
    width: 100%;
    max-width: 440px;
    padding: 18px;
    color: #f8fafc;
    position: relative;
    overflow: hidden;
    animation: alertModalIn 0.35s cubic-bezier(0.2, 1, 0.3, 1) forwards;
}

.ad-modal-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.ad-timer-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(168, 85, 247, 0.16);
    border: 1px solid rgba(168, 85, 247, 0.35);
    color: #d8b4fe;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.82rem;
    font-weight: 700;
    transition: all 0.3s ease;
}

.ad-timer-pill.completed {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.5);
    color: #34d399;
}

.btn-ad-close-x {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    cursor: not-allowed;
    transition: all 0.3s cubic-bezier(0.2, 1, 0.3, 1);
    opacity: 0.35;
    outline: none;
}

.btn-ad-close-x.ready {
    opacity: 1;
    cursor: pointer;
    background: #ef4444;
    color: #ffffff;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.7);
    transform: scale(1.06);
    animation: pulseCloseX 1.5s infinite;
}

.btn-ad-close-x.ready:hover {
    background: #dc2626;
    transform: scale(1.15);
}

@keyframes pulseCloseX {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.ad-progress-wrapper {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    overflow: hidden;
    margin: 0 0 14px 0;
}

.ad-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ec4899, #a855f7, #3b82f6);
    border-radius: 8px;
    transition: width 0.1s linear;
}

.ad-content-box {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 8px;
    min-height: 260px;
    max-height: 340px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.ad-content-box iframe {
    width: 100%;
    height: 260px;
    border: none;
    border-radius: 10px;
    background: transparent;
}

.ad-bottom-info {
    text-align: center;
    margin-top: 12px;
}

.ad-bottom-info p {
    font-size: 0.8rem;
    color: #94a3b8;
    margin: 0;
    line-height: 1.4;
}

.ad-bottom-info strong {
    color: #f8fafc;
}

@media (max-width: 640px) {
    .ad-modal-card {
        padding: 15px;
        border-radius: 16px;
    }
    .ad-content-box {
        min-height: 240px;
    }
    .ad-content-box iframe {
        height: 240px;
    }
}




/* =====================================================
   SELECTION MODE TOOLBAR
   ===================================================== */
.selection-toolbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9000;
    background: linear-gradient(135deg, #1e1b4b, #312e81);
    border-bottom: 2px solid #6366f1;
    animation: slideDown 0.3s ease;
}
.sel-toolbar-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.sel-toolbar-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #c7d2fe;
    font-weight: 500;
}
.sel-toolbar-info > span:first-child {
    font-size: 1.1rem;
    color: #a5b4fc;
}
.sel-count-badge {
    background: rgba(99,102,241,0.3);
    border: 1px solid #6366f1;
    color: #e0e7ff;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}
.sel-toolbar-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}
.sel-confirm-btn {
    background: #6366f1;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 9px 20px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}
.sel-confirm-btn:disabled {
    background: rgba(99,102,241,0.3);
    color: #a5b4fc;
    cursor: not-allowed;
}
.sel-confirm-btn:not(:disabled):hover {
    background: #4f46e5;
    transform: translateY(-1px);
}
.sel-cancel-btn {
    background: rgba(255,255,255,0.1);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 9px 14px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
}
.sel-cancel-btn:hover { background: rgba(255,255,255,0.2); }

/* Cards in selection mode */
.selection-mode .card {
    cursor: pointer !important;
    position: relative;
}
.selection-mode .card .input-area,
.selection-mode .card .card-desc {
    pointer-events: none;
    opacity: 0.5;
}
.card-select-circle {
    display: none;
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.4);
    background: rgba(0,0,0,0.2);
    z-index: 10;
    transition: all 0.2s ease;
}
.selection-mode .card-select-circle {
    display: flex;
    align-items: center;
    justify-content: center;
}
.card.selected .card-select-circle {
    background: #6366f1;
    border-color: #6366f1;
}
.card.selected .card-select-circle::after {
    content: '';
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
}
.card.selected {
    outline: 2.5px solid #6366f1;
    box-shadow: 0 0 0 4px rgba(99,102,241,0.15);
}
.archive-selection-mode .card.selected {
    outline-color: #f59e0b;
}
.archive-selection-mode .card.selected .card-select-circle {
    background: #f59e0b;
    border-color: #f59e0b;
}

/* Pinned badge on cards */
.pinned-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: white;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 3px 8px 3px 6px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    z-index: 5;
    box-shadow: 0 2px 8px rgba(99,102,241,0.4);
}
.pinned-badge i { font-size: 0.55rem; }

/* =====================================================
   ARCHIVE BANNER
   ===================================================== */
.archive-banner {
    background: linear-gradient(135deg, rgba(245,158,11,0.12), rgba(251,191,36,0.08));
    border-bottom: 1px solid rgba(245,158,11,0.25);
    padding: 0;
}
.archive-banner-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: none;
    border: none;
    cursor: pointer;
    color: #f59e0b;
    font-size: 0.88rem;
    font-weight: 700;
    transition: background 0.2s;
    text-align: left;
}
.archive-banner-btn:hover { background: rgba(245,158,11,0.06); }
.archive-banner-btn i:first-child { font-size: 1rem; }
.archive-banner-btn span:first-of-type { flex: 1; }
.archive-banner-count {
    background: #f59e0b;
    color: white;
    border-radius: 20px;
    padding: 2px 9px;
    font-size: 0.72rem;
    font-weight: 800;
}
#archiveBannerChevron {
    font-size: 0.75rem;
    transition: transform 0.3s;
    color: rgba(245,158,11,0.7);
}
#archiveBannerChevron.open { transform: rotate(180deg); }

/* =====================================================
   ARCHIVE PANEL
   ===================================================== */
.archive-panel {
    background: var(--bg);
    border-bottom: 2px solid rgba(245,158,11,0.2);
    padding: 20px;
    animation: slideDown 0.3s ease;
}
.archive-panel-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-muted);
}
.archive-back-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(245,158,11,0.1);
    color: #f59e0b;
    border: 1px solid rgba(245,158,11,0.3);
    border-radius: 10px;
    padding: 7px 14px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}
.archive-back-btn:hover { background: rgba(245,158,11,0.2); }
.archive-panel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}
.archive-panel-grid .card {
    position: relative;
    opacity: 1;
}
.archive-card-unarchive {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(245,158,11,0.15);
    border: 1px solid rgba(245,158,11,0.4);
    color: #f59e0b;
    border-radius: 8px;
    padding: 4px 8px;
    font-size: 0.65rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    z-index: 10;
}
.archive-card-unarchive:hover { background: rgba(245,158,11,0.3); }
.archived-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 3px 8px 3px 6px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 4px;
    text-transform: uppercase;
    z-index: 5;
}

@keyframes slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Unpin button on pinned cards in normal view */
.unpin-btn {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(99,102,241,0.12);
    border: 1px solid rgba(99,102,241,0.3);
    color: #6366f1;
    border-radius: 8px;
    padding: 3px 8px;
    font-size: 0.65rem;
    font-weight: 700;
    cursor: pointer;
    z-index: 10;
    display: none;
    transition: background 0.2s;
}
.unpin-btn:hover { background: rgba(99,102,241,0.25); }
.card[data-pinned="true"] .unpin-btn { display: block; }
.card[data-pinned="true"] { position: relative; }

/* ========================================================
   NEW SIDEBAR PLATFORM STYLING
   ======================================================== */

.sidebar-platforms-section {
    padding: 10px 14px;
    transition: all 0.3s ease;
}

/* Section header row: icon + title + badge */
.sidebar-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.sidebar-section-title-text {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.88rem;
    color: #1f2937;
}

.sidebar-section-title-text i {
    font-size: 0.95rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-sub-desc {
    font-size: 0.68rem;
    color: #9ca3af;
    margin-bottom: 8px;
    padding-left: 2px;
}

.drag-hint {
    font-size: 0.63rem;
    color: #9ca3af;
    margin-top: 5px;
    text-align: center;
    font-style: italic;
}


/* Sidebar Compact Card */
.sidebar-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    height: 52px;
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    margin-bottom: 2px;
}

.sidebar-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    background: #fbfbfd !important;
}

/* Custom Platform Hover Highlights */
.sidebar-card[data-platform="youtube"]:hover { border-color: #ff0000; background: rgba(255, 0, 0, 0.03) !important; }
.sidebar-card[data-platform="tiktok"]:hover { border-color: #000000; background: rgba(0, 0, 0, 0.03) !important; }
.sidebar-card[data-platform="instagram"]:hover { border-color: #e1306c; background: rgba(225, 48, 108, 0.03) !important; }
.sidebar-card[data-platform="twitter"]:hover { border-color: #1da1f2; background: rgba(29, 161, 242, 0.03) !important; }
.sidebar-card[data-platform="facebook"]:hover { border-color: #1877f2; background: rgba(24, 119, 242, 0.03) !important; }
.sidebar-card[data-platform="pinterest"]:hover { border-color: #bd081c; background: rgba(189, 8, 28, 0.03) !important; }
.sidebar-card[data-platform="mediafire"]:hover { border-color: #0070f3; background: rgba(0, 112, 243, 0.03) !important; }
.sidebar-card[data-platform="appvn"]:hover { border-color: #32b832; background: rgba(50, 184, 50, 0.03) !important; }
.sidebar-card[data-platform="apk"]:hover { border-color: #a4c639; background: rgba(164, 198, 57, 0.03) !important; }
.sidebar-card[data-platform="ringtones"]:hover { border-color: #8b5cf6; background: rgba(139, 92, 246, 0.03) !important; }
.sidebar-card[data-platform="xnxx"]:hover { border-color: #f59e0b; background: rgba(245, 158, 11, 0.03) !important; }
.sidebar-card[data-platform="lyrics"]:hover { border-color: #10b981; background: rgba(16, 185, 129, 0.03) !important; }

/* Platform Icon */
.sidebar-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f3f4f6;
    color: #4b5563;
    font-size: 1.1rem;
    flex-shrink: 0;
    transition: all 0.2s;
}

.sidebar-card:hover .sidebar-card-icon {
    background: transparent;
}

/* Platform Name & Subtitle */
.sidebar-card-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.sidebar-card-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1f2937 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-card-badge {
    font-size: 0.65rem;
    font-weight: 500;
    color: #9ca3af !important;
    margin-top: 1px;
}

/* Action Buttons — visible on hover, using absolute positioning */
.sidebar-card-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    opacity: 0;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
    margin-left: auto;
}

.sidebar-card:hover .sidebar-card-actions {
    opacity: 1;
}

/* On touch devices, always show actions */
@media (hover: none) {
    .sidebar-card-actions {
        opacity: 1;
    }
}

.sidebar-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    border-radius: 6px;
    color: #9ca3af;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.15s;
}

.sidebar-action-btn:hover {
    color: #374151;
    background: rgba(0, 0, 0, 0.05);
}

.sidebar-action-btn.unpin:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.sidebar-action-btn.pin:hover {
    color: #ec4899;
    background: rgba(236, 72, 153, 0.1);
}

.sidebar-action-btn.archive:hover {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

/* Old .sidebar-dropdown is replaced by #sidebarDropdownPortal (portal, injected in body via JS) */
/* Keep these styles for any legacy references */
.sidebar-dropdown {
    display: none !important; /* portal used instead */
}


/* Drag Cursor & Styling */
.sidebar-pinned-list .sidebar-card {
    cursor: grab;
}

.sidebar-pinned-list .sidebar-card:active {
    cursor: grabbing;
}

.sidebar-card.dragging {
    opacity: 0.5;
    transform: scale(0.98);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border: 2px dashed #ec4899;
    z-index: 50;
}

.sidebar-pinned-list .sidebar-card.drag-over {
    border-top: 2px dashed #ec4899;
}

/* Archived cards styling */
.sidebar-grid-list .sidebar-card {
    padding: 6px 8px;
    height: 48px;
    flex-direction: row;
    gap: 8px;
}

#sidebarArchivedList .sidebar-card {
    opacity: 0.75;
    filter: grayscale(0.2);
}

#sidebarArchivedList .sidebar-card:hover {
    opacity: 1;
    filter: grayscale(0);
}

/* Info Tooltip */
.sidebar-tooltip {
    position: fixed;
    background: #1f2937;
    color: #ffffff;
    font-size: 0.7rem;
    padding: 6px 10px;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    pointer-events: none;
    z-index: 10000;
    max-width: 200px;
    line-height: 1.3;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.sidebar-tooltip.visible {
    opacity: 1;
}

/* Section D (Archived) Collapse/Expand styling */
#sidebarArchivedSection.collapsed #sidebarArchivedList {
    display: none !important;
}

#sidebarArchivedSection:not(.collapsed) #sidebarArchivedList {
    display: grid !important;
}

#sidebarArchivedSection:not(.collapsed) #archiveSectionChevron {
    transform: rotate(180deg);
}

/* Slide items animation */
@keyframes slideOutLeft {
    0% { transform: translateX(0); opacity: 1; }
    100% { transform: translateX(-20px); opacity: 0; }
}

@keyframes slideInTop {
    0% { transform: translateY(-30px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

.slide-out-left {
    animation: slideOutLeft 0.2s forwards;
}

.slide-in-top {
    animation: slideInTop 0.2s forwards;
}

/* ========================================================
   VOIR PLUS BUTTON — Others section expand
   ======================================================== */
.voir-plus-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin-top: 8px;
    padding: 7px 12px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 10px;
    color: #6366f1;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    grid-column: 1 / -1;
}

.voir-plus-btn:hover {
    background: rgba(99, 102, 241, 0.15);
    transform: translateY(-1px);
}

.voir-plus-btn i {
    font-size: 0.7rem;
    transition: transform 0.2s;
}

/* ========================================================
   SIDEBAR — block horizontal swipe & fix mobile
   ======================================================== */
.main-sidebar {
    overscroll-behavior: contain;
    touch-action: pan-y; /* only allow vertical scroll, block horizontal swipe */
    -webkit-overflow-scrolling: touch;
    overflow-x: hidden;
}

/* Prevent body from scrolling horizontally when sidebar is open */
body.sidebar-open {
    overflow-x: hidden;
    touch-action: pan-y;
}

/* Mobile responsive sidebar card adjustments */
@media (max-width: 480px) {
    .main-sidebar {
        width: 290px;
    }

    .sidebar-card {
        padding: 6px 10px;
        height: 46px;
    }

    .sidebar-card-name {
        font-size: 0.78rem;
    }

    .sidebar-grid-list {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 6px !important;
    }

    .sidebar-grid-list .sidebar-card {
        height: 44px;
        padding: 5px 7px;
    }
}

/* ==========================================================================
   BODY SCROLL LOCK — used when any overlay/modal is open
   ========================================================================== */
body.modal-open {
    overflow: hidden !important;
    /* position:fixed is managed via JS (lockBodyScroll) to preserve scroll offset */
}

/* ==========================================================================
   TOP BAR UNIFIÉE (Grand écran Desktop & Mobile — même logique avec icônes en haut)
   ========================================================================== */
.mobile-top-bar {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: calc(54px + var(--sat, 28px));
    padding-top: var(--sat, 28px);
    background: #ffffff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
    z-index: 2900;
    padding-left: max(20px, calc(var(--sal) + 16px));
    padding-right: max(20px, calc(var(--sar) + 16px));
    box-sizing: border-box;
    transition: opacity 0.2s ease !important;
}

.mobile-top-bar.is-hidden {
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

.mobile-top-bar-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mobile-top-bar-right {
    display: flex;
    align-items: center;
    gap: 7px;
}

.mobile-anizy-btn {
    display: none !important;
}

/* Bouton Hamburger dans la top bar */
.mobile-hamburger-btn {
    width: 36px;
    height: 36px;
    background: transparent !important;
    border: none !important;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0;
    box-shadow: none !important;
    transition: transform 0.15s;
}

.mobile-hamburger-btn:hover {
    background: transparent !important;
    transform: translateY(-1px);
}

.mobile-hamburger-btn span {
    display: block;
    width: 18px;
    height: 2.2px;
    background: #0f172a !important;
    border-radius: 2px;
    transition: transform 0.25s, opacity 0.25s, width 0.25s;
}

.mobile-hamburger-btn.open span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}
.mobile-hamburger-btn.open span:nth-child(2) {
    opacity: 0; width: 0;
}
.mobile-hamburger-btn.open span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* Boutons d'action dans la top bar (Desktop & Mobile) */
.mobile-topbar-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    position: relative;
}

.mobile-topbar-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.mobile-topbar-btn:active {
    transform: scale(0.92);
}

.mobile-topbar-btn.batch-btn {
    background: linear-gradient(135deg, #ff007f 0%, #7f00ff 100%);
    color: white !important;
    box-shadow: 0 3px 10px rgba(255, 0, 127, 0.3);
}

.mobile-topbar-btn.queue-btn {
    background: rgba(127, 0, 255, 0.10);
    color: #7f00ff !important;
    border: 1px solid rgba(127, 0, 255, 0.22);
}

.mobile-topbar-btn.lang-mobile-btn {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-main) !important;
    border: 1px solid rgba(0, 0, 0, 0.12);
    font-size: 1.1rem;
}
.mobile-topbar-btn.lang-mobile-btn:hover {
    background: rgba(255, 0, 127, 0.08);
    color: var(--accent) !important;
    border-color: rgba(255, 0, 127, 0.25);
}

.mobile-topbar-btn.header-notif-btn {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-main) !important;
    border: 1px solid rgba(0, 0, 0, 0.12);
    font-size: 1rem;
}
.mobile-topbar-btn.header-notif-btn:hover {
    background: rgba(255, 0, 127, 0.08);
    color: var(--accent) !important;
    border-color: rgba(255, 0, 127, 0.25);
}

.mobile-topbar-btn.mission-mobile-btn {
    background: rgba(255, 0, 127, 0.08);
    color: #ff007f !important;
    border: 1px solid rgba(255, 0, 127, 0.2);
}
.mobile-topbar-btn.mission-mobile-btn:hover {
    background: rgba(255, 0, 127, 0.16);
    border-color: rgba(255, 0, 127, 0.4);
}

.mobile-topbar-btn.arrow-btn {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-main) !important;
    border: 1px solid rgba(0, 0, 0, 0.12);
}

/* Masquage des anciens boutons isolés et de la rangée de noms sous le titre */
.notif-desktop-btn,
.lang-desktop-btn,
.header-desktop-actions {
    display: none !important;
}

/* Espacement sous la barre supérieure pour tout le monde */
body {
    padding-top: calc(72px + var(--sat)) !important;
}

/* ==========================================================================
   SIDEBAR EXTENSION STATUS CARD
   ========================================================================== */
.sidebar-extension-status-card {
    margin: 10px 14px 4px;
    padding: 10px 12px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid rgba(0, 0, 0, 0.07);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.25s ease;
}

.sidebar-extension-status-card.active {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.09) 0%, rgba(16, 185, 129, 0.02) 100%);
    border-color: rgba(16, 185, 129, 0.35);
}

.sidebar-ext-icon-box {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #64748b;
    flex-shrink: 0;
    transition: all 0.25s ease;
}

.sidebar-extension-status-card.active .sidebar-ext-icon-box {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.sidebar-ext-text-box {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.sidebar-ext-title-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.sidebar-ext-pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #94a3b8;
    flex-shrink: 0;
    display: inline-block;
}

.sidebar-extension-status-card.active .sidebar-ext-pulse-dot {
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: extDotPulse 1.8s infinite alternate;
}

@keyframes extDotPulse {
    0% { transform: scale(0.85); opacity: 0.8; }
    100% { transform: scale(1.25); opacity: 1; box-shadow: 0 0 10px #10b981; }
}

.sidebar-ext-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-ext-subtitle {
    font-size: 0.72rem;
    color: #64748b;
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-ext-status-pill {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 99px;
    background: rgba(0, 0, 0, 0.06);
    color: #64748b;
    flex-shrink: 0;
    text-decoration: none;
    letter-spacing: 0.2px;
}

.sidebar-extension-status-card.active .sidebar-ext-status-pill {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
}

@media (min-width: 769px) {
    .mobile-more-menu {
        bottom: auto !important;
        top: calc(62px + var(--sat)) !important;
        right: 20px !important;
        left: auto !important;
        width: 320px !important;
        border-radius: 18px !important;
        border: 1px solid rgba(0, 0, 0, 0.08) !important;
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12) !important;
    }

    /* Desktop Responsive 3-Column Grid for Cards */
    .grid-container {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 16px !important;
    }
}

@media (max-width: 960px) and (min-width: 769px) {
    .grid-container {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 16px !important;
    }
}

@media (max-width: 768px) {
    .mobile-top-bar {
        padding-left: max(10px, calc(var(--sal) + 8px));
        padding-right: max(10px, calc(var(--sar) + 8px));
    }

    .mobile-hamburger-btn {
        width: 34px;
        height: 34px;
    }

    .mobile-topbar-btn {
        width: 34px;
        height: 34px;
    }

    /* Anti-zoom iOS Safari : les inputs doivent être >= 16px */
    input,
    textarea,
    select,
    .service-input {
        font-size: 16px !important;
    }

    /* Reduce header h1 on mobile */
    header h1 {
        font-size: 1.4rem !important;
    }

    /* Grid: 1 column on mobile for clean card layout */
    .grid-container {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    /* Smaller card padding on mobile */
    .card {
        padding: 16px !important;
    }

    .card-desc {
        font-size: 0.82rem !important;
        margin-bottom: 14px !important;
    }

    .icon-title h3 {
        font-size: 1.05rem !important;
    }

    .icon-title i {
        font-size: 1.2rem !important;
    }

    .badge, .badge-search {
        font-size: 0.7rem !important;
        padding: 4px 8px !important;
    }

    /* Widget floating & panel centering on mobile */
    .download-manager-widget {
        /* Move to bottom-LEFT to avoid overlapping .btn-action buttons on the right */
        /* safe-area-inset-bottom : évite le bouton home bar iPhone */
        bottom: max(20px, calc(var(--sab) + 12px)) !important;
        right: auto !important;
        left: max(20px, calc(var(--sal) + 14px)) !important;
    }

    .download-manager-widget.expanded {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        background: rgba(0, 0, 0, 0.6) !important;
        backdrop-filter: none !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        z-index: 9999 !important;
    }

    .download-manager-widget.expanded .widget-panel {
        width: 90vw !important;
        max-width: 360px !important;
        /* Laisser de la place pour la home-bar iPhone */
        max-height: calc(80dvh - var(--sab)) !important;
        border-radius: 20px !important;
        box-shadow: 0 20px 50px rgba(0,0,0,0.5) !important;
        padding-bottom: calc(12px + var(--sab)) !important;
        -webkit-overflow-scrolling: touch;
    }
}

/* ==========================================================================
   PIN BADGE on pinned cards
   ========================================================================== */
.card-pin-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 0.72rem;
    color: #ec4899;
    z-index: 5;
    pointer-events: none;
    line-height: 1;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.15));
}

/* ==========================================================================
   SPINNER on download action buttons (3 sec rotating indicator)
   ========================================================================== */
@keyframes btnSpinAnim {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.btn-spin-indicator {
    display: inline-block;
    animation: btnSpinAnim 0.75s linear infinite;
}

/* ==========================================================================
   SEARCH RESULT ITEMS & SHIMMER SKELETON ANIMATIONS (Mobile & Desktop)
   ========================================================================== */

@keyframes adultShimmerSweep {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.shimmer-loading {
    background: linear-gradient(90deg, rgba(148, 163, 184, 0.12) 0%, rgba(148, 163, 184, 0.28) 50%, rgba(148, 163, 184, 0.12) 100%) !important;
    background-size: 200% 100% !important;
    animation: adultShimmerSweep 1.4s infinite linear !important;
}

.search-results-list:empty,
#modalSearchResults:empty,
.search-results-list.hidden,
#modalSearchResults.hidden,
.search-results-list[style*="display: none"],
#modalSearchResults[style*="display: none"] {
    display: none !important;
    padding: 0 !important;
    margin: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    border: none !important;
}

.search-results-list,
#modalSearchResults {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 6px 4px 18px 4px;
    max-height: calc(82vh - 60px);
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior-y: contain !important;
    contain: layout style !important;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
    width: 100%;
    box-sizing: border-box;
}

.search-results-list::-webkit-scrollbar,
#modalSearchResults::-webkit-scrollbar {
    width: 6px;
}
.search-results-list::-webkit-scrollbar-track,
#modalSearchResults::-webkit-scrollbar-track {
    background: transparent;
}
.search-results-list::-webkit-scrollbar-thumb,
#modalSearchResults::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}
.search-results-list::-webkit-scrollbar-thumb:hover,
#modalSearchResults::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.adult-search-item {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 16px !important;
    padding: 12px 16px !important;
    min-height: 94px !important;
    height: auto !important;
    border-radius: 20px !important;
    background: #ffffff !important;
    border: 1.5px solid #e2e8f0 !important;
    cursor: pointer !important;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
    position: relative !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04) !important;
    flex-shrink: 0 !important;
    width: 100% !important;
}

.adult-search-item:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 25px rgba(225, 29, 72, 0.12) !important;
    border-color: #e11d48 !important;
    background: #fff5f7 !important;
}

.adult-search-item:active {
    transform: scale(0.99) !important;
}

.adult-thumb-wrapper {
    width: 140px !important;
    min-width: 140px !important;
    max-width: 140px !important;
    height: 80px !important;
    min-height: 80px !important;
    max-height: 80px !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
    position: relative !important;
    background: #0f172a !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.10) !important;
    box-sizing: border-box !important;
}

.adult-thumb {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    border-radius: 14px !important;
    transition: transform 0.3s ease, opacity 0.25s ease !important;
}

.adult-search-item:hover .adult-thumb {
    transform: scale(1.06) !important;
}

.adult-duration-badge {
    position: absolute !important;
    bottom: 5px !important;
    right: 5px !important;
    background: rgba(15, 23, 42, 0.90) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    color: #ffffff !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    padding: 2px 7px !important;
    border-radius: 6px !important;
    z-index: 2 !important;
    letter-spacing: 0.3px !important;
    line-height: 1.3 !important;
}

.adult-info {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    gap: 6px !important;
}

.adult-title {
    font-size: 14.5px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    line-height: 1.38 !important;
    margin: 0 !important;
    text-overflow: ellipsis !important;
    word-break: break-word !important;
    transition: color 0.2s ease !important;
}

.adult-search-item:hover .adult-title {
    color: #e11d48 !important;
}

.adult-meta-row {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
    font-size: 12px !important;
    color: #64748b !important;
    font-weight: 600 !important;
}

.adult-source-tag {
    font-size: 10.5px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    padding: 3px 9px !important;
    border-radius: 6px !important;
    letter-spacing: 0.4px !important;
    line-height: 1.2 !important;
}

.tag-xnxx {
    background: #ffe4e6 !important;
    color: #e11d48 !important;
    border: 1px solid #fecdd3 !important;
}

.tag-xvideo {
    background: #dbeafe !important;
    color: #1d4ed8 !important;
    border: 1px solid #bfdbfe !important;
}

.tag-anime {
    background: #f3e8ff !important;
    color: #7e22ce !important;
    border: 1px solid #e9d5ff !important;
}

.adult-action-btn {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    border-radius: 50% !important;
    background: #f1f5f9 !important;
    color: #64748b !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 12px !important;
    margin-left: auto !important;
    flex-shrink: 0 !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    border: 1px solid #e2e8f0 !important;
}

.adult-search-item:hover .adult-action-btn {
    background: #e11d48 !important;
    border-color: #e11d48 !important;
    color: #ffffff !important;
    transform: scale(1.1) !important;
}

@media (max-width: 640px) {
    .search-results-list:empty,
    #modalSearchResults:empty,
    .search-results-list.hidden,
    #modalSearchResults.hidden,
    .search-results-list[style*="display: none"],
    #modalSearchResults[style*="display: none"] {
        display: none !important;
        padding: 0 !important;
        margin: 0 !important;
        height: 0 !important;
        min-height: 0 !important;
        border: none !important;
    }
    .search-results-list,
    #modalSearchResults {
        gap: 10px;
        padding: 4px 2px 14px 2px;
    }
    .adult-search-item {
        padding: 10px 12px !important;
        gap: 12px !important;
        min-height: 82px !important;
        border-radius: 16px !important;
    }
    .adult-thumb-wrapper {
        width: 110px !important;
        min-width: 110px !important;
        max-width: 110px !important;
        height: 66px !important;
        min-height: 66px !important;
        max-height: 66px !important;
        border-radius: 10px !important;
    }
    .adult-title {
        font-size: 13px !important;
    }
    .adult-meta-row {
        font-size: 11px !important;
    }
    .adult-action-btn {
        width: 30px !important;
        height: 30px !important;
        min-width: 30px !important;
        font-size: 10px !important;
    }
}

/* Red heart state for favorites */
.btn-fav.active {
    background: #ef4444 !important;
    color: #ffffff !important;
    border-color: #ef4444 !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35) !important;
}

.btn-fav.active i {
    color: #ffffff !important;
}

/* Mobile 2x2 Action Grid Overlay */
.mobile-action-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.mobile-action-overlay-content {
    background: #ffffff;
    border-radius: 24px;
    padding: 24px;
    width: 100%;
    max-width: 320px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.mobile-action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 16px;
}

.mobile-action-card-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 12px;
    border-radius: 16px;
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    background: #f8fafc;
    color: #1e293b;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-action-card-btn i {
    font-size: 1.4rem;
}

.mobile-action-card-btn:active {
    transform: scale(0.95);
}

/* ==========================================================================
   APK SOURCE SELECTION MODAL & STYLES
   ========================================================================== */

.apk-source-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.apk-source-btn:active {
    transform: translateY(0);
}

/* Responsive APK input area */
.input-area-apk {
    display: flex;
    gap: 10px;
    background: #f0f1f8;
    padding: 5px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: border-color 0.2s, box-shadow 0.2s;
    align-items: center;
}

.input-area-apk:focus-within {
    border-color: rgba(255, 0, 127, 0.35);
    box-shadow: 0 0 0 3px rgba(255, 0, 127, 0.07);
}

.input-area-apk .service-input {
    background: transparent;
    border: none;
    color: var(--text-main);
    padding: 10px;
    flex: 1;
    outline: none;
    font-family: inherit;
    font-size: 0.92rem;
}

.input-area-apk .service-input::placeholder {
    color: #9ca3af;
}

.input-area-apk .btn-action {
    background: linear-gradient(135deg, #ff007f, #7f00ff);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(255, 0, 127, 0.3);
    flex-shrink: 0;
}

.input-area-apk .btn-action:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 18px rgba(255, 0, 127, 0.4);
}

@media (max-width: 480px) {
    .input-area-apk {
        flex-direction: row;
        padding: 4px 6px;
        gap: 6px;
        flex-wrap: nowrap;
    }

    .input-area-apk .service-input {
        width: auto;
        flex: 1;
        padding: 10px 8px;
        min-width: 0;
    }

    .input-area-apk .btn-action {
        width: 40px;
        height: 40px;
        flex-shrink: 0;
    }
}

@media (max-width: 768px) {
    #apkSourceModal .modal-content {
        max-width: 92%;
        padding: 24px 18px;
        border-radius: 16px;
    }

    .apk-source-btn {
        padding: 14px 16px !important;
    }
}

.mobile-action-card-btn.btn-video-act {
    background: linear-gradient(135deg, #ff007f 0%, #7f00ff 100%);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 15px rgba(255, 0, 127, 0.25);
}

.mobile-action-card-btn.btn-audio-act {
    background: #ffffff;
    border-color: rgba(127, 0, 255, 0.3);
    color: #7f00ff;
}

.mobile-action-card-btn.btn-fav-act {
    background: #fef2f2;
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.mobile-action-card-btn.btn-fav-act.active {
    background: #ef4444;
    color: #ffffff;
}

.mobile-action-card-btn.btn-coll-act {
    background: #f5f3ff;
    border-color: rgba(124, 58, 237, 0.3);
    color: #7c3aed;
}

.mobile-action-card-btn.btn-close-act {
    grid-column: 1 / -1;
    background: #f1f5f9;
    color: #64748b;
    border: 1.5px solid #e2e8f0;
    flex-direction: row;
    padding: 10px;
    font-size: 0.85rem;
}

/* ==========================================================================
   MOBILE RESULT BAR — compact bottom action bar (≤768px only)
   ========================================================================== */
.mobile-result-bar {
    display: none;
}

.actions-desktop {
    display: flex;
}

@media (min-width: 769px) {
    .mobile-result-bar,
    .mob-options-overlay {
        display: none !important;
    }
}

@media (max-width: 768px) {
    /* Hide desktop action row, show mobile bar */
    .actions-desktop {
        display: none !important;
    }

    .mobile-result-bar {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-top: 14px;
        padding: 10px 12px;
        background: #f8fafc;
        border-radius: 16px;
        border: 1.5px solid rgba(0,0,0,0.07);
    }

    .mob-back-btn {
        display: flex;
        align-items: center;
        gap: 6px;
        background: #e2e8f0;
        color: #475569;
        border: none;
        border-radius: 10px;
        padding: 8px 14px;
        font-weight: 700;
        font-size: 0.88rem;
        cursor: pointer;
        white-space: nowrap;
    }

    .mob-video-btn {
        display: flex;
        align-items: center;
        gap: 6px;
        background: linear-gradient(135deg, #ff007f 0%, #7f00ff 100%);
        color: #fff;
        border: none;
        border-radius: 10px;
        padding: 8px 16px;
        font-weight: 700;
        font-size: 0.88rem;
        cursor: pointer;
    }

    .mob-options-btn {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        background: #1e293b;
        color: #fff;
        border: none;
        font-size: 1rem;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    /* Fix close-modal (X) visibility on mobile */
    .modal-content {
        position: relative;
        padding-top: 48px !important;
    }

    .close-modal {
        position: absolute;
        top: 12px !important;
        right: 16px !important;
        font-size: 28px !important;
        z-index: 10;
        background: rgba(0,0,0,0.05);
        border-radius: 50%;
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
    }

    /* Modal full height on mobile */
    #resultModal .modal-content {
        max-height: 90vh;
        overflow-y: auto;
    }
}

/* ==========================================================================
   MOBILE 2×2 OPTIONS OVERLAY (for all platforms)
   ========================================================================== */
.mob-options-overlay, .mob-lyrics-options-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 19999;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    align-items: center;
    justify-content: center;
}

.mob-options-overlay.open, .mob-lyrics-options-overlay.open {
    display: flex;
}

.mob-options-panel, .mob-lyrics-options-panel {
    background: rgba(28, 28, 32, 0.84) !important;
    backdrop-filter: blur(35px) saturate(190%) !important;
    -webkit-backdrop-filter: blur(35px) saturate(190%) !important;
    border: 1.2px solid rgba(255, 255, 255, 0.22) !important;
    border-radius: 28px !important;
    padding: 24px 20px 20px;
    width: 90%;
    max-width: 320px;
    box-shadow: 0 25px 65px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
    color: #f2f2f7 !important;
}

[data-theme="light"] .mob-options-panel, [data-theme="light"] .mob-lyrics-options-panel {
    background: rgba(248, 248, 252, 0.85) !important;
    border: 1.2px solid rgba(255, 255, 255, 0.8) !important;
    color: #1c1c1e !important;
}

.mob-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 0;
}

.mob-opt-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 18px 12px;
    border-radius: 18px !important;
    background: rgba(120, 120, 128, 0.16) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    color: #000000 !important;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: none !important;
    transition: all 0.15s ease;
}

[data-theme="light"] .mob-opt-btn {
    background: rgba(120, 120, 128, 0.14) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    color: #000000 !important;
}

.mob-opt-btn i {
    font-size: 1.45rem;
    color: #374151 !important; /* Gris foncé */
}

[data-theme="light"] .mob-opt-btn i {
    color: #374151 !important; /* Gris foncé */
}

.mob-opt-btn span {
    color: #000000 !important; /* Nom de l'icône en noir */
    font-weight: 700 !important;
    font-size: 0.84rem !important;
}

[data-theme="light"] .mob-opt-btn span {
    color: #000000 !important;
    font-weight: 700 !important;
}

.mob-opt-btn:active {
    transform: scale(0.95);
    background: rgba(0, 0, 0, 0.12) !important;
}

#mobOptVideo, #mobOptAudio, #mobOptFav, #mobOptColl, #mobLyricsDownloadBtn, #mobLyricsFavBtn, #mobLyricsCollBtn {
    background: rgba(120, 120, 128, 0.16) !important;
    color: #000000 !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: none !important;
}

[data-theme="light"] #mobOptVideo, [data-theme="light"] #mobOptAudio, [data-theme="light"] #mobOptFav, [data-theme="light"] #mobOptColl, [data-theme="light"] #mobLyricsDownloadBtn, [data-theme="light"] #mobLyricsFavBtn, [data-theme="light"] #mobLyricsCollBtn {
    background: rgba(120, 120, 128, 0.14) !important;
    color: #000000 !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
}

#mobOptVideo i, #mobOptAudio i, #mobOptFav i, #mobOptColl i, #mobLyricsDownloadBtn i, #mobLyricsFavBtn i, #mobLyricsCollBtn i {
    color: #374151 !important; /* Gris foncé */
}

[data-theme="light"] #mobOptVideo i, [data-theme="light"] #mobOptAudio i, [data-theme="light"] #mobOptFav i, [data-theme="light"] #mobOptColl i, [data-theme="light"] #mobLyricsDownloadBtn i, [data-theme="light"] #mobLyricsFavBtn i, [data-theme="light"] #mobLyricsCollBtn i {
    color: #374151 !important; /* Gris foncé */
}

#mobOptVideo span, #mobOptAudio span, #mobOptFav span, #mobOptColl span, #mobLyricsDownloadBtn span, #mobLyricsFavBtn span, #mobLyricsCollBtn span {
    color: #000000 !important; /* Nom de l'icône en noir */
    font-weight: 700 !important;
}

#mobOptFav.active, #mobLyricsFavBtn.active {
    background: rgba(239, 68, 68, 0.18) !important;
    border-color: rgba(239, 68, 68, 0.35) !important;
    color: #000000 !important;
}

#mobOptFav.active i, #mobLyricsFavBtn.active i {
    color: #ef4444 !important;
}

/* ==========================================================================
   COLLECTION DROPDOWN — desktop & mobile
   ========================================================================== */

/* Desktop dropdown wrapper (pops up cleanly above the Collection button) */
.coll-dropdown {
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    left: auto;
    z-index: 10000;
    width: 290px;
    max-width: 90vw;
    background: #ffffff;
    border-radius: 18px;
    border: 1.5px solid rgba(0, 0, 0, 0.12);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18), 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    animation: fadeInUp 0.2s ease;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.coll-dropdown-header {
    padding: 12px 16px 10px;
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #64748b;
    background: #f8fafc;
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.coll-dropdown-list {
    padding: 10px;
    max-height: 250px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Each collection item */
.coll-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    cursor: pointer;
    background: #f8fafc;
    border: 1.5px solid rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
    text-decoration: none;
    user-select: none;
    position: relative;
    overflow: hidden;
}

.coll-dropdown-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: rgba(99, 102, 241, 0.3);
}

.coll-dropdown-item.loading,
.coll-dropdown-item.empty {
    justify-content: center;
    border: none;
    background: transparent;
    cursor: default;
    box-shadow: none;
    transform: none;
}

/* Collection dropdown inside mobile overlay */
.mob-coll-dropdown {
    margin-top: 14px;
    background: #ffffff;
    border-radius: 16px;
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    max-height: 240px;
    overflow-y: auto;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.mob-coll-dropdown .coll-dropdown-header {
    background: #f8fafc;
    padding: 12px 16px 8px;
}

.mob-coll-dropdown .coll-dropdown-list {
    padding: 8px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Collection picker — fixed overlay (not clipped by result modal overflow) */
.coll-picker-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 30000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: none;
    box-sizing: border-box;
}
.coll-picker-overlay.open {
    display: flex !important;
}
.coll-picker-panel {
    width: min(360px, 92vw);
    max-height: min(70vh, 440px);
    background: #ffffff;
    border-radius: 18px;
    border: 1.5px solid rgba(0, 0, 0, 0.10);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.coll-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: #64748b;
    background: #f8fafc;
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}
.coll-picker-close {
    border: none;
    background: rgba(15, 23, 42, 0.06);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    color: #475569;
    flex-shrink: 0;
}
.coll-picker-close:hover {
    background: rgba(15, 23, 42, 0.12);
    color: #0f172a;
}
.coll-picker-list {
    padding: 10px;
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 80px;
    max-height: none;
}

/* Never let the in-modal dropdown steal layout */
#resultModal #collDropdown {
    display: none !important;
}

/* ==========================================================================
   LYRICS MOBILE OVERLAY — option overlay for lyrics modal
   ========================================================================== */
.mob-lyrics-bar {
    display: none;
}

@media (min-width: 769px) {
    .mob-lyrics-bar,
    .mob-lyrics-options-overlay,
    .mob-lyrics-sub-overlay {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .mob-lyrics-bar {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-top: 14px;
        padding: 10px 12px;
        background: #f8fafc;
        border-radius: 16px;
        border: 1.5px solid rgba(0,0,0,0.07);
    }

    .mob-lyrics-visualise-btn {
        background: #e2e8f0;
        color: #1e293b;
        border: none;
        border-radius: 10px;
        padding: 8px 14px;
        font-weight: 700;
        font-size: 0.88rem;
        cursor: pointer;
    }
}

.mob-lyrics-options-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 19999;
    background: rgba(15,23,42,0.7);
    backdrop-filter: none;
    align-items: center;
    justify-content: center;
}

.mob-lyrics-options-overlay.open {
    display: flex;
}

.mob-lyrics-options-panel {
    background: #ffffff;
    border-radius: 24px;
    padding: 24px 20px 20px;
    width: 90%;
    max-width: 300px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    max-height: 80vh;
    overflow-y: auto;
}

.mob-lyrics-sub-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 20000;
    background: rgba(15,23,42,0.8);
    backdrop-filter: none;
    align-items: center;
    justify-content: center;
}

.mob-lyrics-sub-overlay.open {
    display: flex;
}

.mob-lyrics-sub-panel {
    background: #ffffff;
    border-radius: 24px;
    padding: 24px 20px 20px;
    width: 90%;
    max-width: 300px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    max-height: 80vh;
    overflow-y: auto;
}

.mob-lyrics-format-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: #f8fafc;
    border: 1.5px solid rgba(0,0,0,0.08);
    border-radius: 12px;
    padding: 12px 14px;
    font-weight: 700;
    font-size: 0.9rem;
    color: #1e293b;
    cursor: pointer;
    margin-bottom: 8px;
}

.mob-lyrics-format-btn:active {
    transform: scale(0.97);
}

/* ==========================================================================
   FAV ACTIVE STATE — red heart inside icon button
   ========================================================================== */
.btn-fav.active,
#mobOptFav.active {
    background: #ef4444 !important;
    color: #ffffff !important;
    border-color: #ef4444 !important;
}

.btn-fav.active i,
#mobOptFav.active i {
    color: #ffffff !important;
}

/* Download spinner already defined (.btn-spin-indicator) */

/* ==========================================================================
   DUPLICATE META SECTION FIX — hide platform+title repeat on mobile
   ========================================================================== */
@media (max-width: 768px) {
    .result-dup-hide {
        display: none !important;
    }
}

/* ==========================================================================
   RATE LIMITING & COOLDOWN ANIMATIONS
   ========================================================================== */
.btn-action.cooldown {
    position: relative;
    pointer-events: none !important;
    background: rgba(15, 23, 42, 0.88) !important;
    border: 1.5px solid rgba(239, 68, 68, 0.55) !important;
    box-shadow:
        0 0 0 3px rgba(239, 68, 68, 0.08),
        0 0 20px rgba(239, 68, 68, 0.18) !important;
    color: #fca5a5 !important;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(0.94);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    filter: grayscale(0.2);
}

/* Sweeping conic gradient fill that drains clockwise */
.btn-action.cooldown::before {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: inherit;
    background: conic-gradient(
        from -90deg,
        rgba(239, 68, 68, 0.22) 0deg,
        transparent 60deg
    );
    animation: btnCooldownSweep 2s linear infinite;
    pointer-events: none;
}

/* Red shimmer line across top */
.btn-action.cooldown::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 60%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(239,68,68,0.18), transparent);
    animation: btnCooldownShimmer 1.6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes btnCooldownSweep {
    to { transform: rotate(360deg); }
}
@keyframes btnCooldownShimmer {
    0%   { left: -60%; opacity: 0; }
    40%  { opacity: 1; }
    100% { left: 120%; opacity: 0; }
}

.card.shake-limit {
    animation: cardLimitShake 0.4s cubic-bezier(.36,.07,.19,.97) both;
}
@keyframes cardLimitShake {
    10%, 90% { transform: translate3d(-2px, 0, 0); }
    20%, 80% { transform: translate3d(3px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-5px, 0, 0); }
    40%, 60% { transform: translate3d(5px, 0, 0); }
}
.btn-action.ready-pulse {
    animation: limitReadyPulse 0.75s ease-out;
}
@keyframes limitReadyPulse {
    0%   { transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.8); background: #10b981 !important; }
    50%  { transform: scale(1.15); box-shadow: 0 0 0 12px rgba(16, 185, 129, 0); background: #10b981 !important; }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}


/* ==========================================================================
   LANGUAGE SELECTOR - Desktop Button and Dropdown
   ========================================================================== */

/* Lang Desktop Btn masqué : géré dans la top bar unifiée */
.lang-desktop-btn {
    display: none !important;
}

.lang-dropdown-menu {
    position: fixed;
    top: calc(58px + var(--sat));
    right: 20px;
    z-index: 4001;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.09);
    border-radius: 18px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.14);
    padding: 8px 0;
    min-width: 200px;
    animation: langDropIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}
/* On mobile, dropdown opens below the top bar */
@media (max-width: 768px) {
    .lang-dropdown-menu {
        top: 56px;
        right: 12px;
        left: 12px;
        min-width: 0;
        border-radius: 14px;
    }
}
@keyframes langDropIn {
    from { opacity: 0; transform: translateY(12px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.lang-dropdown-header {
    padding: 10px 16px 8px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #9ca3af;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    margin-bottom: 4px;
}

.lang-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 16px;
    background: transparent;
    border: none;
    font-family: Outfit, sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
    cursor: pointer;
    text-align: left;
    transition: background 0.15s ease, color 0.15s ease;
}
.lang-dropdown-item:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--accent);
}
.lang-dropdown-item.active {
    background: rgba(255, 0, 127, 0.06);
    color: var(--accent);
    font-weight: 700;
}

.lang-flag {
    font-size: 1.15rem;
    line-height: 1;
    flex-shrink: 0;
}
.lang-name {
    flex: 1;
}

/* ==========================================================================
   MOBILE MORE MENU
   ========================================================================== */

.mobile-more-menu {
    position: fixed;
    bottom: 64px;
    left: 0;
    right: 0;
    z-index: 3500;
    background: #ffffff;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.14);
    padding: 6px 0 12px;
    animation: moreMenuIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}
@keyframes moreMenuIn {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

.mobile-more-menu-header {
    padding: 14px 20px 10px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #9ca3af;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    margin-bottom: 4px;
}

.mobile-menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 20px;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 500;
    transition: background 0.15s ease;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
}
.mobile-menu-item:hover {
    background: rgba(0, 0, 0, 0.04);
}

.menu-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.menu-icon-lang  { color: #8B5CF6; font-size: 1.15rem; width: 22px; text-align: center; }
.menu-icon-game  { color: #f59e0b; font-size: 1.15rem; width: 22px; text-align: center; }
.menu-icon-batch { color: #3b82f6; font-size: 1.15rem; width: 22px; text-align: center; }
.menu-icon-queue { color: #10b981; font-size: 1.15rem; width: 22px; text-align: center; }

.menu-item-arrow {
    font-size: 0.75rem;
    color: rgba(0, 0, 0, 0.25);
    flex-shrink: 0;
}


/* 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-bottom: 75px !important;
    }
    .main-container {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 8px !important;
        padding-right: 8px !important;
        padding-top: 0 !important;
        margin: 0 !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: 2px !important;
        padding-right: 2px !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;
}

/* ==========================================================================
   IOS IPHONE CRYSTAL GLASSMORPHISM - SEARCH RESULT MODAL
   ========================================================================== */
#resultModal {
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

#resultModal .modal-content {
    background: rgba(255, 255, 255, 0.88) !important;
    backdrop-filter: blur(30px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(30px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.75) !important;
    border-radius: 28px !important;
    box-shadow: 0 25px 65px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
    padding: 24px 20px 20px !important;
}

/* Suppress Download Quality Notice Box completely */
#modalQualityNotice, .modal-quality-notice {
    display: none !important;
}

/* Square Thumbnail Container (1:1 Ratio) */
.ios-thumb-square {
    position: relative;
    width: 170px;
    height: 170px;
    min-width: 170px;
    min-height: 170px;
    border-radius: 22px;
    overflow: hidden;
    background: #f1f2f6;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), inset 0 0 0 1px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .ios-thumb-square {
        width: 145px;
        height: 145px;
        min-width: 145px;
        min-height: 145px;
        border-radius: 20px;
    }
}

.ios-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: inherit;
    transition: opacity 0.3s ease;
}

/* Loading Placeholder: Logo + Shimmer Wave */
.ios-thumb-loading-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border-radius: inherit;
    overflow: hidden;
    z-index: 2;
}

.thumb-loading-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
    z-index: 3;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.15));
    animation: iosPulse 2s ease-in-out infinite;
}

.thumb-shimmer-sweep {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        rgba(255, 255, 255, 0) 20%,
        rgba(255, 255, 255, 0.8) 50%,
        rgba(255, 255, 255, 0) 80%
    );
    transform: translateX(-100%);
    animation: iosShimmer 1.6s infinite;
    z-index: 4;
}

@keyframes iosShimmer {
    100% {
        transform: translateX(100%);
    }
}

@keyframes iosPulse {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.06); opacity: 1; }
}

/* Loaded Badge: Frynzy Logo at Bottom-Right of Thumbnail */
.thumb-frynzy-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3px;
    box-sizing: border-box;
    z-index: 5;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.9);
}

.thumb-frynzy-badge img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Title & Platform Section */
.ios-result-info {
    flex: 1;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ios-title-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 4px;
}

.ios-platform-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    min-width: 26px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.05);
    font-size: 0.95rem;
    color: #4b5563;
    flex-shrink: 0;
    margin-top: 1px;
}

.ios-platform-badge.instagram { color: #e1306c; background: rgba(225, 48, 108, 0.1); }
.ios-platform-badge.tiktok { color: #000000; background: rgba(0, 0, 0, 0.08); }
.ios-platform-badge.youtube { color: #ef4444; background: rgba(239, 68, 68, 0.1); }
.ios-platform-badge.facebook { color: #1877f2; background: rgba(24, 119, 242, 0.1); }
.ios-platform-badge.twitter { color: #1da1f2; background: rgba(29, 161, 242, 0.1); }

.ios-media-title {
    margin: 0 !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    color: #3a3a3c !important; /* iOS gray */
    line-height: 1.35 !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;
}

.ios-see-more-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.ios-see-more-dots {
    color: #8e8e93;
    font-size: 0.85rem;
    font-weight: 700;
}

.ios-see-more-btn {
    background: rgba(0, 122, 255, 0.08);
    border: none;
    color: #007aff; /* Apple Blue */
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    padding: 3px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.ios-see-more-btn:active {
    background: rgba(0, 122, 255, 0.18);
    opacity: 0.8;
}

.ios-media-meta {
    color: #8e8e93 !important; /* iOS secondary label */
    font-size: 0.8rem !important;
    margin: 6px 0 0 !important;
    font-weight: 500 !important;
}

/* Action Bar in Result Modal */
.ios-result-bar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-top: 20px !important;
    padding-top: 16px !important;
    border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
    gap: 12px !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Download Button: Large, iOS Frosted Translucent Gray, turns black when pressed */
.ios-dl-main-btn {
    width: 58px;
    height: 58px;
    border-radius: 19px;
    background: rgba(142, 142, 147, 0.16) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    color: #636366 !important;
    font-size: 1.55rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
}

.ios-dl-main-btn:active, .ios-dl-main-btn.pressed {
    background: rgba(0, 0, 0, 0.18) !important;
    color: #000000 !important;
    transform: scale(0.92);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12) !important;
}

/* Options Button (...): iPhone Crystal Glass, gray turns black on press */
.ios-more-main-btn {
    width: 58px;
    height: 58px;
    border-radius: 19px;
    background: rgba(142, 142, 147, 0.16) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    color: #636366 !important;
    font-size: 1.45rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06) !important;
    flex-shrink: 0;
}

.ios-more-main-btn:active, .ios-more-main-btn.pressed {
    background: rgba(0, 0, 0, 0.18) !important;
    color: #000000 !important;
    transform: scale(0.92);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12) !important;
}

/* "Voir Plus" iOS Crystal Modal */
.ios-see-more-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 21000;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ios-see-more-modal.open {
    display: flex !important;
    animation: fadeIn 0.2s ease;
}

.ios-see-more-sheet {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(35px) saturate(180%);
    -webkit-backdrop-filter: blur(35px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 26px;
    width: 100%;
    max-width: 460px;
    max-height: 80vh;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: iosPopUp 0.25s cubic-bezier(0.2, 0.9, 0.3, 1);
}

[data-theme="dark"] .ios-see-more-sheet,
body.dark-mode .ios-see-more-sheet {
    background: rgba(24, 25, 32, 0.96) !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65) !important;
}

@keyframes iosPopUp {
    0% { transform: scale(0.92); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.ios-see-more-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    position: relative;
}

[data-theme="dark"] .ios-see-more-header,
body.dark-mode .ios-see-more-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.ios-sheet-handle {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 4px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

[data-theme="dark"] .ios-sheet-handle,
body.dark-mode .ios-sheet-handle {
    background: rgba(255, 255, 255, 0.25) !important;
}

.ios-see-more-header-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ios-see-more-badge {
    font-size: 1rem;
    display: flex;
    align-items: center;
}

.ios-see-more-title-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1c1c1e;
}

[data-theme="dark"] .ios-see-more-title-label,
body.dark-mode .ios-see-more-title-label {
    color: #f8fafc !important;
}

.ios-see-more-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.08);
    color: #636366;
    font-size: 0.95rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

[data-theme="dark"] .ios-see-more-close,
body.dark-mode .ios-see-more-close {
    background: rgba(255, 255, 255, 0.14) !important;
    color: #f1f5f9 !important;
}

.ios-see-more-close:active {
    background: rgba(0, 0, 0, 0.18);
    transform: scale(0.92);
}

[data-theme="dark"] .ios-see-more-close:active,
body.dark-mode .ios-see-more-close:active {
    background: rgba(255, 255, 255, 0.25) !important;
}

.ios-see-more-body {
    padding: 16px 20px 24px;
    overflow-y: auto;
    max-height: 65vh;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ios-see-more-body::-webkit-scrollbar {
    width: 5px;
}

.ios-see-more-body::-webkit-scrollbar-thumb {
    background: rgba(142, 142, 147, 0.35);
    border-radius: 4px;
}

.ios-see-more-full-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1c1c1e;
    line-height: 1.45;
    word-break: break-word;
}

[data-theme="dark"] .ios-see-more-full-title,
body.dark-mode .ios-see-more-full-title {
    color: #f8fafc !important;
}

.ios-see-more-desc-box {
    background: rgba(142, 142, 147, 0.08);
    border-radius: 14px;
    padding: 14px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .ios-see-more-desc-box,
body.dark-mode .ios-see-more-desc-box {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.ios-see-more-section-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #8e8e93;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

[data-theme="dark"] .ios-see-more-section-title,
body.dark-mode .ios-see-more-section-title {
    color: #94a3b8 !important;
}

.ios-see-more-full-desc {
    font-size: 0.9rem;
    color: #3a3a3c;
    line-height: 1.6;
    word-break: break-word;
    white-space: pre-line;
    user-select: text;
}

[data-theme="dark"] .ios-see-more-full-desc,
body.dark-mode .ios-see-more-full-desc {
    color: #cbd5e1 !important;
}

.ios-see-more-tags-box {
    background: rgba(142, 142, 147, 0.08);
    border-radius: 14px;
    padding: 14px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .ios-see-more-tags-box,
body.dark-mode .ios-see-more-tags-box {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.ios-see-more-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Crystal Options Panel */
.mob-options-panel {
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(35px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(35px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    border-radius: 28px !important;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22) !important;
}

.mob-opt-btn {
    border-radius: 18px !important;
    background: rgba(142, 142, 147, 0.14) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    color: #000000 !important;
}

.mob-opt-btn i {
    color: #374151 !important;
}

.mob-opt-btn span {
    color: #000000 !important;
    font-weight: 700 !important;
}

.mob-opt-btn:active {
    background: rgba(0, 0, 0, 0.14) !important;
    color: #000000 !important;
}

/* ==========================================================================
   IPHONE CRYSTAL GLASSMORPHISM - ADULT SEARCH & CUSTOM VIDEO PLAYER
   ========================================================================== */

#resultModal {
    background: rgba(10, 15, 29, 0.6) !important;
}

#resultModal .modal-content {
    background: #ffffff !important;
    border-radius: 24px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
}

[data-theme="dark"] #resultModal .modal-content {
    background: #181d28 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.6) !important;
}

.adult-search-item {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 16px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
    padding: 12px 14px !important;
    transition: transform 0.12s ease !important;
    contain: content !important;
}

.adult-search-item:hover, .adult-search-item:active {
    background: #f8fafc !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08) !important;
}

[data-theme="dark"] .adult-search-item {
    background: #232936 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
}

[data-theme="dark"] .adult-search-item:hover, [data-theme="dark"] .adult-search-item:active {
    background: #2d3444 !important;
}

.adult-player-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10500;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(10, 12, 16, 0.45);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    padding: 16px;
    animation: fadeInModal 0.25s ease;
}

.adult-player-container {
    width: 100%;
    max-width: 680px;
    background: rgba(28, 28, 34, 0.88) !important;
    backdrop-filter: blur(35px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(35px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 30px !important;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
    padding: 18px 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow: hidden;
    color: #f8fafc;
}

[data-theme="dark"] .adult-player-container {
    background: rgba(24, 24, 30, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

.adult-player-modal.is-landscape {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #000000 !important;
    z-index: 9999999 !important;
    border-radius: 0 !important;
    overflow: hidden !important;
}

.adult-player-modal.is-landscape .adult-player-container {
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: #000000 !important;
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    overflow: hidden !important;
}

.adult-player-modal.is-landscape .adult-video-wrapper {
    width: 100vw !important;
    height: 100vh !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    position: absolute !important;
    inset: 0 !important;
    background: #000000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 1 !important;
}

.adult-player-modal.is-landscape .adult-video-tap-overlay {
    position: absolute !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 5 !important;
    cursor: pointer !important;
    -webkit-tap-highlight-color: transparent !important;
}


.adult-player-modal.is-landscape #adultCustomVideo {
    width: 100% !important;
    height: 100% !important;
    max-height: 100vh !important;
    object-fit: contain !important;
    background: #000000 !important;
}

.adult-player-modal.is-landscape .adult-player-header {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 20 !important;
    padding: max(14px, env(safe-area-inset-top, 14px)) max(24px, env(safe-area-inset-right, 24px)) 16px max(24px, env(safe-area-inset-left, 24px)) !important;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 65%, transparent 100%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 14px !important;
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.adult-player-modal.is-landscape .adult-player-controls {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 20 !important;
    padding: 16px max(24px, env(safe-area-inset-right, 24px)) max(14px, env(safe-area-inset-bottom, 14px)) max(24px, env(safe-area-inset-left, 24px)) !important;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.45) 70%, transparent 100%) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.adult-player-modal.is-landscape .adult-player-actions {
    display: none !important;
}

.adult-player-modal.is-landscape .controls-hidden {
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

.adult-player-modal.is-landscape .adult-ctrl-btn {
    width: 44px !important;
    height: 44px !important;
}

.adult-player-modal .adult-landscape-dl-btn,
.adult-player-modal .adult-header-orient-btn {
    display: none;
}

.adult-player-modal.is-landscape .adult-landscape-dl-btn,
.adult-player-modal.is-landscape .adult-header-orient-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    cursor: pointer;
}

.adult-player-modal.is-landscape .adult-landscape-dl-btn:active,
.adult-player-modal.is-landscape .adult-header-orient-btn:active {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(0.92);
}

.adult-player-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.adult-player-back-btn, .adult-player-close-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.adult-player-back-btn:hover, .adult-player-close-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

.adult-player-title-wrap {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.adult-player-source-tag {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #f1f5f9;
}

.adult-player-title {
    font-size: 0.95rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #f1f5f9;
}

.adult-video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 20px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    contain: layout paint;
}

.adult-video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.adult-video-tap-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.adult-center-play-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.adult-center-play-btn i {
    margin-left: 4px;
}

.adult-video-spinner {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    font-size: 2rem;
    pointer-events: none;
}

.adult-player-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 4px 6px;
}

.adult-timeline-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.adult-time-text {
    font-size: 0.78rem;
    font-weight: 600;
    color: #94a3b8;
    min-width: 36px;
    font-variant-numeric: tabular-nums;
}

.adult-seekbar-wrap {
    position: relative;
    flex: 1;
    height: 20px;
    display: flex;
    align-items: center;
}

.adult-seekbar-track {
    position: absolute;
    left: 0;
    right: 0;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.12);
    overflow: hidden;
}

.adult-seekbar-buffer {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0%;
    background: rgba(255, 255, 255, 0.2);
}

.adult-seekbar-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0%;
    background: linear-gradient(90deg, #94a3b8, #f1f5f9) !important;
    border-radius: 3px;
}

.adult-seek-slider {
    position: relative;
    width: 100%;
    height: 20px;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
    margin: 0;
}

.adult-ctrl-buttons-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.adult-ctrl-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.adult-ctrl-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.adult-ctrl-btn {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.adult-ctrl-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.adult-play-toggle-btn {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.22) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.adult-play-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.3) !important;
}

.adult-btn-badge {
    position: absolute;
    bottom: 7px;
    font-size: 8px;
    font-weight: 800;
}

.adult-quality-toggle-btn {
    border-radius: 12px !important;
    width: auto !important;
    min-width: 42px !important;
    padding: 0 8px !important;
    font-weight: 800 !important;
    font-size: 0.78rem !important;
    letter-spacing: 0.5px !important;
    color: #10b981 !important;
    border-color: rgba(16, 185, 129, 0.4) !important;
    background: rgba(16, 185, 129, 0.15) !important;
}

.adult-quality-toggle-btn.is-hd {
    color: #38bdf8 !important;
    border-color: rgba(56, 189, 248, 0.4) !important;
    background: rgba(56, 189, 248, 0.15) !important;
}

/* Actions : iPhone Crystal Glass Frosted Buttons */
.adult-player-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}

.adult-btn-download {
    flex: 1;
    height: 48px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.12) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #f1f5f9 !important;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.22) !important;
    transition: transform 0.2s ease, background 0.2s ease;
}

.adult-btn-download i {
    color: #94a3b8;
    font-size: 1.05rem;
}

.adult-btn-download:hover {
    background: rgba(255, 255, 255, 0.18) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

.adult-btn-download:active {
    transform: scale(0.98);
    background: rgba(255, 255, 255, 0.25) !important;
}

.adult-btn-external {
    height: 48px;
    padding: 0 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    color: #94a3b8 !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.adult-btn-external:hover {
    background: rgba(255, 255, 255, 0.14) !important;
    color: #fff !important;
}


/* ==========================================================================
   MULTI-IMAGE GALLERY CONTROLS ON THUMBNAIL (PINTEREST, TWITTER, ETC.)
   ========================================================================== */
.thumb-multi-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 12px;
    padding: 3px 9px;
    font-size: 0.74rem;
    font-weight: 700;
    display: none;
    align-items: center;
    gap: 5px;
    z-index: 8;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    pointer-events: none;
    user-select: none;
    line-height: 1;
}

.thumb-multi-badge i {
    font-size: 0.72rem;
    color: #38bdf8;
}

.thumb-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.32);
    color: #ffffff;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    cursor: pointer;
    z-index: 9;
    transition: transform 0.12s ease, background 0.12s ease, opacity 0.12s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
    padding: 0;
    touch-action: manipulation;
}

.thumb-nav-btn:active {
    transform: translateY(-50%) scale(0.9);
    background: rgba(37, 99, 235, 0.95);
}

.thumb-nav-prev {
    left: 6px;
}

.thumb-nav-next {
    right: 6px;
}

.thumb-gallery-counter {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    padding: 2px 10px;
    font-size: 0.70rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 8;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
    pointer-events: none;
    user-select: none;
    line-height: 1.2;
}
