/* ========================================
   悬浮球 (Float Ball) 样式
   韩系黑白灰 · 毛玻璃风格
   ======================================== */

/* 悬浮球主体 */
#float-ball {
    position: fixed;
    z-index: 9999;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    transition: opacity 0.3s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
#float-ball:active {
    cursor: grabbing;
}
#float-ball.fb-hidden {
    display: none !important;
}
#float-ball img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    border-radius: 0;
    background: transparent;
}
/* 默认图标（无自定义图片时）- 简洁ins风，无背景无渐变 */
#float-ball .fb-default-icon {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    font-size: 24px;
    box-shadow: none;
    border: 1.5px solid rgba(0,0,0,0.15);
}

/* 悬浮球菜单 - 韩系毛玻璃 */
#float-ball-menu {
    position: fixed;
    z-index: 9998;
    display: none;
    flex-direction: column;
    gap: 0;
    background: rgba(255,255,255,0.55);
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.10), 0 1.5px 6px rgba(0,0,0,0.06);
    overflow: hidden;
    min-width: 210px;
    animation: fbMenuIn 0.22s ease-out;
    backdrop-filter: blur(24px) saturate(1.2);
    -webkit-backdrop-filter: blur(24px) saturate(1.2);
    border: 1px solid rgba(255,255,255,0.45);
}
#float-ball-menu.show {
    display: flex;
}
@keyframes fbMenuIn {
    from { opacity: 0; transform: scale(0.88); }
    to { opacity: 1; transform: scale(1); }
}
.fb-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    font-size: 15px;
    color: #222;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}
.fb-menu-item:last-child {
    border-bottom: none;
}
.fb-menu-item:active {
    background: rgba(0,0,0,0.04);
}
.fb-menu-item i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}
/* 菜单图标 - 无背景无渐变简洁ins风 */
.fb-menu-item .fb-menu-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    background: transparent !important;
    color: #333 !important;
    border: 1px solid rgba(0,0,0,0.10);
}
.fb-menu-item .fb-menu-text {
    flex: 1;
}
.fb-menu-item .fb-menu-title {
    font-size: 14px;
    font-weight: 500;
    color: #222;
}
.fb-menu-item .fb-menu-desc {
    font-size: 11px;
    color: #999;
    margin-top: 2px;
}

/* 悬浮球菜单遮罩 */
#float-ball-menu-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 9997;
    background: transparent;
    display: none;
}
#float-ball-menu-overlay.show {
    display: block;
}

/* ========================================
   智能助手弹窗 - 韩系毛玻璃居中
   ======================================== */
#fb-assistant-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 10000;
    background: rgba(0,0,0,0.25);
    display: none;
    justify-content: center;
    align-items: center;
    animation: fbFadeIn 0.2s;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
#fb-assistant-overlay.show {
    display: flex;
}
@keyframes fbFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
#fb-assistant-panel {
    width: 92%;
    max-width: 420px;
    height: 65vh;
    background: rgba(255,255,255,0.60);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: fbScaleIn 0.28s ease-out;
    backdrop-filter: blur(28px) saturate(1.3);
    -webkit-backdrop-filter: blur(28px) saturate(1.3);
    border: 1px solid rgba(255,255,255,0.50);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}
@keyframes fbScaleIn {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}
.fb-assistant-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    background: rgba(255,255,255,0.35);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #222;
}
.fb-assistant-header .fb-assist-title {
    font-size: 17px;
    font-weight: 600;
    color: #222;
}
.fb-assistant-header .fb-assist-close {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
    transition: background 0.15s;
}
.fb-assistant-header .fb-assist-close:active {
    background: rgba(0,0,0,0.12);
}
.fb-assistant-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: rgba(245,245,247,0.45);
}
.fb-assist-msg {
    margin-bottom: 14px;
    display: flex;
    gap: 10px;
}
.fb-assist-msg.assistant {
    flex-direction: row;
}
.fb-assist-msg.user {
    flex-direction: row-reverse;
}
.fb-assist-msg .fb-msg-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}
.fb-assist-msg.assistant .fb-msg-avatar {
    background: rgba(0,0,0,0.06);
    color: #333;
    border: 1px solid rgba(0,0,0,0.08);
}
.fb-assist-msg.user .fb-msg-avatar {
    background: #333;
    color: #fff;
}
.fb-assist-msg .fb-msg-bubble {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.6;
    word-break: break-word;
    white-space: pre-wrap;
}
.fb-assist-msg.assistant .fb-msg-bubble {
    background: rgba(255,255,255,0.70);
    color: #222;
    border-top-left-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.fb-assist-msg.user .fb-msg-bubble {
    background: #333;
    color: #fff;
    border-top-right-radius: 4px;
}
.fb-assistant-input-bar {
    display: flex;
    gap: 10px;
    padding: 12px 16px;
    border-top: 1px solid rgba(0,0,0,0.06);
    background: rgba(255,255,255,0.40);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    align-items: center;
}
.fb-assistant-input-bar input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    background: rgba(255,255,255,0.55);
    color: #222;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.fb-assistant-input-bar input:focus {
    border-color: rgba(0,0,0,0.20);
}
.fb-assistant-input-bar input::placeholder {
    color: #aaa;
}
.fb-assistant-input-bar button {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: #333;
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s;
}
.fb-assistant-input-bar button:active {
    background: #555;
}
.fb-assist-typing {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    color: #999;
    font-size: 13px;
}
.fb-assist-typing .dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #999;
    animation: fbTypingDot 1.2s infinite;
}
.fb-assist-typing .dot:nth-child(2) { animation-delay: 0.2s; }
.fb-assist-typing .dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes fbTypingDot {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1); }
}

/* ========================================
   预设切换弹窗 - 韩系毛玻璃
   ======================================== */
#fb-preset-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 10000;
    background: rgba(0,0,0,0.25);
    display: none;
    justify-content: center;
    align-items: center;
    animation: fbFadeIn 0.2s;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
#fb-preset-overlay.show {
    display: flex;
}
#fb-preset-panel {
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    background: rgba(255,255,255,0.58);
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: fbScaleIn 0.25s ease-out;
    backdrop-filter: blur(28px) saturate(1.3);
    -webkit-backdrop-filter: blur(28px) saturate(1.3);
    border: 1px solid rgba(255,255,255,0.45);
    box-shadow: 0 12px 40px rgba(0,0,0,0.10);
}
.fb-preset-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}
.fb-preset-header h3 {
    margin: 0;
    font-size: 17px;
    color: #222;
}
.fb-preset-header .fb-preset-close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #888;
    transition: background 0.15s;
}
.fb-preset-header .fb-preset-close:active {
    background: rgba(0,0,0,0.12);
}
.fb-preset-tabs {
    display: flex;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    background: rgba(255,255,255,0.25);
}
.fb-preset-tab {
    flex: 1;
    text-align: center;
    padding: 12px 0;
    font-size: 14px;
    color: #888;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}
.fb-preset-tab.active {
    color: #222;
    border-bottom-color: #333;
    font-weight: 600;
}
.fb-preset-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}
.fb-preset-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    margin-bottom: 8px;
    background: rgba(255,255,255,0.45);
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.15s;
    border: 1px solid rgba(0,0,0,0.04);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.fb-preset-item:active {
    background: rgba(0,0,0,0.04);
}
.fb-preset-item.active {
    background: rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.15);
}
.fb-preset-item .fb-preset-name {
    font-size: 14px;
    color: #222;
    font-weight: 500;
}
.fb-preset-item .fb-preset-info {
    font-size: 12px;
    color: #999;
    margin-top: 2px;
}
.fb-preset-item .fb-preset-apply {
    padding: 6px 14px;
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,0.12);
    background: transparent;
    color: #333;
    font-size: 12px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s;
    pointer-events: none; /* [FIX-预设点击] 让点击穿透到父div的onclick */
}
.fb-preset-item .fb-preset-apply:active {
    background: rgba(0,0,0,0.06);
}
.fb-preset-empty {
    text-align: center;
    padding: 30px;
    color: #999;
    font-size: 14px;
}

/* ========================================
   联系人跳转弹窗 - 韩系毛玻璃
   ======================================== */
#fb-contact-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 10000;
    background: rgba(0,0,0,0.25);
    display: none;
    justify-content: center;
    align-items: center;
    animation: fbFadeIn 0.2s;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
#fb-contact-overlay.show {
    display: flex;
}
#fb-contact-panel {
    width: 90%;
    max-width: 400px;
    max-height: 70vh;
    background: rgba(255,255,255,0.58);
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: fbScaleIn 0.25s ease-out;
    backdrop-filter: blur(28px) saturate(1.3);
    -webkit-backdrop-filter: blur(28px) saturate(1.3);
    border: 1px solid rgba(255,255,255,0.45);
    box-shadow: 0 12px 40px rgba(0,0,0,0.10);
}
.fb-contact-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}
.fb-contact-header h3 {
    margin: 0;
    font-size: 17px;
    color: #222;
}
.fb-contact-header .fb-contact-close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #888;
    transition: background 0.15s;
}
.fb-contact-header .fb-contact-close:active {
    background: rgba(0,0,0,0.12);
}
.fb-contact-search {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}
.fb-contact-search input {
    width: 100%;
    padding: 8px 14px;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    background: rgba(255,255,255,0.50);
    box-sizing: border-box;
    color: #222;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.fb-contact-search input:focus {
    border-color: rgba(0,0,0,0.18);
}
.fb-contact-search input::placeholder {
    color: #aaa;
}
.fb-contact-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 16px;
}
.fb-contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.15s;
    margin-bottom: 4px;
}
.fb-contact-item:active {
    background: rgba(0,0,0,0.04);
}
.fb-contact-item img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(0,0,0,0.04);
}
.fb-contact-item .fb-ct-name {
    font-size: 15px;
    color: #222;
}

/* ========================================
   快捷启动App弹窗 - 韩系毛玻璃
   ======================================== */
#fb-app-launcher-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 10000;
    background: rgba(0,0,0,0.25);
    display: none;
    justify-content: center;
    align-items: center;
    animation: fbFadeIn 0.2s;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
#fb-app-launcher-overlay.show {
    display: flex;
}
#fb-app-launcher-panel {
    width: 90%;
    max-width: 400px;
    max-height: 75vh;
    background: rgba(255,255,255,0.58);
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: fbScaleIn 0.25s ease-out;
    backdrop-filter: blur(28px) saturate(1.3);
    -webkit-backdrop-filter: blur(28px) saturate(1.3);
    border: 1px solid rgba(255,255,255,0.45);
    box-shadow: 0 12px 40px rgba(0,0,0,0.10);
}
.fb-app-launcher-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}
.fb-app-launcher-header h3 {
    margin: 0;
    font-size: 17px;
    color: #222;
}
.fb-app-launcher-close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #888;
    transition: background 0.15s;
}
.fb-app-launcher-close:active {
    background: rgba(0,0,0,0.12);
}
.fb-app-launcher-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 16px;
    overflow-y: auto;
    flex: 1;
}
.fb-al-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 10px 4px;
    border-radius: 12px;
    transition: background 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.fb-al-item:active {
    background: rgba(0,0,0,0.05);
}
.fb-al-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(0,0,0,0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #333;
    margin-bottom: 6px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(0,0,0,0.06);
}
.fb-al-name {
    font-size: 11px;
    color: #555;
    text-align: center;
    line-height: 1.3;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ========================================
   悬浮球设置弹窗 - 韩系毛玻璃
   ======================================== */
#fb-settings-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 10000;
    background: rgba(0,0,0,0.25);
    display: none;
    justify-content: center;
    align-items: center;
    animation: fbFadeIn 0.2s;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
#fb-settings-overlay.show {
    display: flex;
}
#fb-settings-panel {
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    background: rgba(255,255,255,0.58);
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: fbScaleIn 0.25s ease-out;
    backdrop-filter: blur(28px) saturate(1.3);
    -webkit-backdrop-filter: blur(28px) saturate(1.3);
    border: 1px solid rgba(255,255,255,0.45);
    box-shadow: 0 12px 40px rgba(0,0,0,0.10);
}
.fb-settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}
.fb-settings-header h3 {
    margin: 0;
    font-size: 17px;
    color: #222;
}
.fb-settings-header .fb-settings-close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #888;
    transition: background 0.15s;
}
.fb-settings-header .fb-settings-close:active {
    background: rgba(0,0,0,0.12);
}
.fb-settings-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
}
.fb-settings-group {
    margin-bottom: 20px;
}
.fb-settings-group-title {
    font-size: 13px;
    color: #999;
    margin-bottom: 10px;
    font-weight: 500;
}
.fb-settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}
.fb-settings-row:last-child {
    border-bottom: none;
}
.fb-settings-label {
    font-size: 15px;
    color: #222;
}
.fb-settings-value {
    font-size: 14px;
    color: #999;
}
.fb-settings-slider {
    width: 120px;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    border-radius: 2px;
    background: rgba(0,0,0,0.10);
    outline: none;
}
.fb-settings-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #333;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.fb-upload-btn {
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px dashed rgba(0,0,0,0.15);
    background: rgba(255,255,255,0.35);
    font-size: 13px;
    color: #555;
    cursor: pointer;
    text-align: center;
    transition: background 0.15s;
}
.fb-upload-btn:active {
    background: rgba(0,0,0,0.04);
}
.fb-settings-img-preview {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    background: rgba(0,0,0,0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.06);
}
.fb-settings-img-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: transparent;
}
.fb-settings-color-input {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
    background: transparent;
}
.fb-btn-danger {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 12px;
    background: #333;
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.15s;
}
.fb-btn-danger:active {
    background: #555;
}

/* iOS/安卓底部安全区域适配 */
.fb-assistant-input-bar {
    padding-bottom: 12px;
}

/* 暗色主题适配 - 韩系毛玻璃暗色 */
.cute-theme #float-ball-menu,
.korean-theme #float-ball-menu {
    background: rgba(30,30,30,0.65);
    border-color: rgba(255,255,255,0.08);
}
.cute-theme .fb-menu-item,
.korean-theme .fb-menu-item {
    color: #eee;
    border-bottom-color: rgba(255,255,255,0.06);
}
.cute-theme .fb-menu-item .fb-menu-icon,
.korean-theme .fb-menu-item .fb-menu-icon {
    color: #ddd !important;
    border-color: rgba(255,255,255,0.10) !important;
}
.cute-theme .fb-menu-item .fb-menu-title,
.korean-theme .fb-menu-item .fb-menu-title {
    color: #eee;
}

/* 设置页面悬浮球开关 */
.fb-toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}
.fb-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}
.fb-toggle-switch .fb-toggle-bg {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #ccc;
    border-radius: 24px;
    transition: .3s;
}
.fb-toggle-switch .fb-toggle-dot {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: .3s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    pointer-events: none;
}
.fb-toggle-switch input:checked + .fb-toggle-bg {
    background: #333;
}
.fb-toggle-switch input:checked + .fb-toggle-bg + .fb-toggle-dot {
    transform: translateX(20px);
}

/* ====== [PERF] Mobile Performance for Float Ball ====== */
@media (max-width: 768px), (hover: none) {
    /* Disable all backdrop-filter in float ball menus - 17 instances causing massive GPU load */
    [class*="fb-menu"],
    [class*="fb-overlay"],
    [class*="fb-popup"],
    [class*="fb-modal"],
    .fb-quick-reply-bar,
    .fb-status-bar,
    .fb-typing-bar,
    .fb-dm-header,
    .fb-dm-input-bar {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
    .fb-tab { transition: color 0.2s, border-color 0.2s !important; }
}
