/* Meeting App Responsive Stylesheet */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css');

:root {
    color-scheme: dark;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

/* Global Dark Theme Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.35);
}

::-webkit-scrollbar-corner {
    background: transparent;
}

html, body {
    width: 100%;
    height: 100%;
    height: 100dvh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #121316;
    color: #e8eaed;
    color-scheme: dark;
    overflow: hidden;
    position: fixed;
}

/* Main Container */
.main-container {
    width: 100%;
    height: 100%;
    height: 100dvh;
    display: flex;
    position: relative;
    overflow: hidden;
}

.video-call-container {
    flex: 1;
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    overflow: hidden;
    background-color: #121316;
}

/* Video Streams */
.video-streams {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #121316;
    overflow: hidden;
}

/* Remote Video */
.remote-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #121316;
    z-index: 1;
}

/* Total eradication of default browser/Android HTML5 play icon thumbnail on blank videos */
video {
    background-color: #000000 !important;
}

video::-webkit-media-controls,
video::-webkit-media-controls-start-playback-button,
video::-webkit-media-controls-play-button,
video::-webkit-media-controls-overlay-play-button,
video::-webkit-media-controls-enclosure {
    display: none !important;
    -webkit-appearance: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

#remoteVideo {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Full view without cutting off */
    background-color: #000000;
    transition: object-fit 0.25s ease;
    image-rendering: -webkit-optimize-contrast;
}

#remoteVideo.fit-cover {
    object-fit: cover;
}

/* Peer Video Hidden locally via Eye 2 (Stealth Blank Screen - Audio remains active) */
.remote-video.remote-hidden #remoteVideo,
.remote-video.remote-hidden #remote-call-card,
.remote-video.remote-hidden .user-avatar {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

/* Local Video (Picture-in-Picture & Draggable / Resizable) */
.local-video {
    position: absolute;
    bottom: 80px;
    right: 20px;
    width: 190px;
    height: 115px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
    border: 2px solid rgba(255, 255, 255, 0.22);
    background-color: #202124;
    z-index: 25;
    overflow: hidden;
    cursor: move;
    touch-action: none; /* Allows smooth mobile touch dragging */
    user-select: none;
    -webkit-user-select: none;
    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Blank Screen Policy: When bottom call controls dock is collapsed, hide local video camera box completely */
body.controls-collapsed .local-video,
.local-video.dock-hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: scale(0.92) !important;
}

.local-video:hover {
    border-color: #8ab4f8;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.7);
}

.local-video.dragging {
    opacity: 0.92;
    border-color: #8ab4f8;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.85);
    cursor: grabbing;
}

/* Preset Sizes */
.local-video.size-mini {
    width: 120px !important;
    height: 75px !important;
}

.local-video.size-normal {
    width: 190px !important;
    height: 115px !important;
}

.local-video.size-large {
    width: 260px !important;
    height: 160px !important;
}

.local-video.hidden-preview {
    display: none !important;
}

/* Local Camera Overlay Bar (Drag hint, Size, Hide) */
.local-camera-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 30px;
    padding: 3px 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.75), transparent);
    z-index: 10;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.local-video:hover .local-camera-overlay,
.local-video.touch-active .local-camera-overlay {
    opacity: 1;
    pointer-events: auto;
}

.local-drag-hint {
    color: rgba(255, 255, 255, 0.75);
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 2px;
}

.local-action-buttons {
    display: flex;
    align-items: center;
    gap: 4px;
    pointer-events: auto;
}

.local-overlay-btn {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #e8eaed;
    width: 22px;
    height: 22px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.local-overlay-btn:hover {
    background: #1a73e8;
    color: #ffffff;
    border-color: #8ab4f8;
}

/* Resize Corner at Bottom Right */
.local-resize-corner {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 18px;
    height: 18px;
    cursor: se-resize;
    z-index: 12;
    touch-action: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    background: linear-gradient(135deg, transparent 50%, rgba(255, 255, 255, 0.6) 50%);
}

.local-video:hover .local-resize-corner,
.local-video.touch-active .local-resize-corner {
    opacity: 1;
}

/* Floating Restore Self-View Pill when camera preview is hidden */
.restore-local-pill {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 45;
    background: rgba(28, 30, 34, 0.85);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    color: #8ab4f8;
    border: 1px solid rgba(138, 180, 248, 0.35);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    display: none;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
    transition: all 0.2s ease;
}

.restore-local-pill:hover {
    background: #1a73e8;
    color: #ffffff;
    transform: scale(1.05);
}

#localVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1); /* Mirror selfie view */
    background-color: #202124;
    image-rendering: -webkit-optimize-contrast;
}

.local-video.active {
    position: absolute;
    inset: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    aspect-ratio: unset;
    border-radius: 0;
    border: none;
    z-index: 5;
}

.local-video.active #localVideo {
    object-fit: contain;
}

.remote-video.active {
    position: absolute;
    bottom: 80px;
    right: 20px;
    width: 190px;
    max-width: 24vw;
    aspect-ratio: 16 / 9;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
    border: 2px solid rgba(255, 255, 255, 0.2);
    z-index: 15;
    overflow: hidden;
}

.remote-video.active #remoteVideo {
    object-fit: cover;
}

/* User Avatar fallback */
.user-avatar {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #2d2e30;
    color: #8ab4f8;
    font-size: 2.5rem;
}

.d-none {
    display: none !important;
}

/* iOS-style Floating Call Controls Dock (Max 85% width, Compact & Frosted Glass) */
.call-controls {
    position: absolute;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    max-width: 85%;
    width: auto;
    z-index: 50;
    background: rgba(22, 26, 32, 0.70);
    opacity: 0.70; /* 70% opacity default as requested */
    -webkit-backdrop-filter: blur(24px) saturate(190%);
    backdrop-filter: blur(24px) saturate(190%);
    padding: 6px 8px;
    border-radius: 36px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    transition: transform 0.35s cubic-bezier(0.33, 1, 0.68, 1), opacity 0.25s ease;
    box-sizing: border-box;
}

.call-controls:hover, .call-controls:active, .call-controls:focus-within {
    opacity: 0.95;
}

.call-controls.collapsed {
    transform: translateX(-50%) translateY(140%);
    opacity: 0 !important;
    pointer-events: none;
}

/* Single Volume Progress Bar Overlay (Left Sound Icon + 1 Gray-to-White Bar) */
.volume-hud-bar {
    position: fixed;
    bottom: 74px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10035;
    background: rgba(18, 22, 28, 0.82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 7px 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    animation: popVolumeBar 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transition: opacity 0.25s ease, transform 0.25s ease;
    user-select: none;
    -webkit-user-select: none;
}

@keyframes popVolumeBar {
    from { opacity: 0; transform: translateX(-50%) translateY(6px) scale(0.96); }
    to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

.volume-hud-inner {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Sound Icon on Left Side */
.volume-hud-sound-icon {
    font-size: 13px;
    color: #9ca3af;
    cursor: pointer;
    transition: color 0.15s ease, transform 0.15s ease;
    flex-shrink: 0;
}

.volume-hud-sound-icon:hover {
    color: #ffffff;
    transform: scale(1.15);
}

.volume-hud-sound-icon.muted {
    color: #9ca3af;
}

/* Single Track Container */
.volume-hud-track-container {
    position: relative;
    width: 125px;
    height: 7px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.12);
    overflow: hidden;
    cursor: pointer;
    touch-action: none;
}

/* Single Progress Bar: Subtle Gray to White Gradient */
.volume-hud-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    /* Subtle Gray to White Gradient as Volume Increases */
    background: linear-gradient(90deg, #525866 0%, #858d9d 40%, #d1d5db 75%, #ffffff 100%);
    border-radius: 6px;
    transition: width 0.08s ease-out;
}

.volume-hud-fill.muted {
    background: #4b5563 !important;
}

/* Right Side One-Click Mute Button (Monochrome Gray) */
.volume-hud-mute-btn {
    background: none !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 2px 4px !important;
    margin: 0 !important;
    font-size: 13px;
    color: #9ca3af;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease, transform 0.15s ease;
    flex-shrink: 0;
}

.volume-hud-mute-btn:hover {
    color: #ffffff;
    transform: scale(1.15);
}

.volume-hud-mute-btn.is-muted {
    color: #d1d5db;
}

/* Horizontal Scrollable Controls Wrapper */
.controls-scroll-wrapper {
    display: flex;
    align-items: center;
    gap: 7px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-behavior: smooth;
    padding: 2px 2px;
    min-width: 0;
    flex: 1 1 auto;
}

.controls-scroll-wrapper::-webkit-scrollbar {
    display: none;
}

/* Pinned Static Right Action Container (Never Scrolls - ONLY Dropdown Arrow) */
.controls-static-action {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 6px;
    margin-left: 4px;
    border-left: 1px solid rgba(255, 255, 255, 0.16);
    flex-shrink: 0;
}

.toggle-bar-btn {
    background: rgba(255, 255, 255, 0.08);
    color: #c4c7c5;
    opacity: 0.68;
}

.toggle-bar-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    opacity: 1;
}

/* Floating Stealth Outline End-Call Button (Above Bottom Bar, 10px rounded, 20% Opacity) */
.floating-end-call-btn {
    position: fixed;
    bottom: calc(75px + env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%);
    height: 22px;
    width: auto;
    padding: 2px 8px !important;
    border-radius: 10px !important;
    background: rgba(239, 68, 68, 0.15) !important;
    border: 1px solid rgba(239, 68, 68, 0.5) !important;
    color: #f87171 !important;
    opacity: 0.20; /* 20% Opacity as requested */
    display: none;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    z-index: 10050;
    transition: opacity 0.2s ease, transform 0.2s ease, bottom 0.25s ease, background 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
    line-height: 1;
}

.floating-end-call-btn:hover {
    opacity: 0.95 !important;
    background: rgba(239, 68, 68, 0.40) !important;
    border-color: rgba(239, 68, 68, 0.85) !important;
    color: #ffffff !important;
    transform: translateX(-50%) scale(1.06);
}

.floating-end-call-btn:active {
    transform: translateX(-50%) scale(0.94);
}

.floating-end-call-btn i {
    font-size: 9.5px !important;
    color: #f87171 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.floating-end-call-btn:hover i,
.floating-end-call-btn:hover .end-btn-text {
    color: #ffffff !important;
}

.floating-end-call-btn .end-btn-text {
    font-size: 10px !important;
    font-weight: 600 !important;
    color: #f87171 !important;
    letter-spacing: 0.2px;
    line-height: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.floating-end-call-btn.dock-collapsed {
    bottom: calc(44px + env(safe-area-inset-bottom, 0px));
}

/* Minimalist Stealth Arrow-Up Launcher at Screen Bottom */
.expand-bar-btn {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%) translateY(24px);
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    color: rgba(255, 255, 255, 0.85);
    font-size: 20px;
    cursor: pointer;
    z-index: 49;
    min-width: 160px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 20px;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.33, 1, 0.68, 1), opacity 0.3s ease, color 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.expand-bar-btn.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 0.05 !important; /* 50% opacity reduction as requested (now 5% opacity) */
    pointer-events: auto;
}

.expand-bar-btn.visible.holding {
    opacity: 0.25 !important;
    transform: translateX(-50%) scale(1.15);
}

.expand-bar-btn:hover {
    color: #ffffff;
    opacity: 0.1 !important;
}

.control-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: #e8eaed;
    opacity: 0.68; /* 32% opacity reduction as requested (not full white, softly transparent) */
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all 0.2s ease;
    position: relative;
    flex-shrink: 0;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    opacity: 1;
    transform: scale(1.05);
}

.control-btn:active {
    transform: scale(0.95);
}

.control-btn.active {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #9ca3af !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    box-shadow: none !important;
}

/* Camera (Person Icon) Button: Inactive/Blocked = Grey fas fa-user-slash; Active = Pure White fas fa-user */
#toggle-camera {
    color: #9ca3af !important;
    background: rgba(255, 255, 255, 0.08) !important;
    transition: all 0.2s ease;
}

#toggle-camera i {
    color: #9ca3af !important;
    font-size: 1.15rem;
    transition: color 0.2s ease;
}

#toggle-camera.camera-blocked {
    color: #9ca3af !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    box-shadow: none !important;
}

#toggle-camera.camera-blocked i {
    color: #9ca3af !important;
}

#toggle-camera:not(.camera-blocked),
#toggle-camera.camera-active {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.22) !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2) !important;
    opacity: 1 !important;
}

#toggle-camera:not(.camera-blocked) i,
#toggle-camera.camera-active i {
    color: #ffffff !important;
}

/* Screen Share Control Button: Slashed Grey when Inactive / Stopped; Pure White when Active */
#toggle-screen {
    color: #9ca3af !important;
    background: rgba(255, 255, 255, 0.08) !important;
    transition: all 0.2s ease;
}

#toggle-screen .screen-icon-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

#toggle-screen .screen-icon-wrapper i {
    color: #9ca3af !important;
    font-size: 1.15rem;
    transition: color 0.2s ease;
}

/* Slashed computer desktop icon when stopped / inactive */
#toggle-screen:not(.sharing-active) .screen-icon-wrapper::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 2px;
    background: #9ca3af;
    transform: translate(-50%, -50%) rotate(-45deg);
    border-radius: 1px;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.9);
    pointer-events: none;
    transition: all 0.2s ease;
}

#toggle-screen:not(.sharing-active):hover {
    background: rgba(255, 255, 255, 0.16) !important;
}

#toggle-screen:not(.sharing-active):hover .screen-icon-wrapper i {
    color: #d1d5db !important;
}

#toggle-screen:not(.sharing-active):hover .screen-icon-wrapper::after {
    background: #d1d5db;
}

/* Active Screen Sharing State: White icon, no slash, no fa-stop */
#toggle-screen.sharing-active {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.22) !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2) !important;
    opacity: 1 !important;
}

#toggle-screen.sharing-active .screen-icon-wrapper i {
    color: #ffffff !important;
}

#toggle-screen.sharing-active .screen-icon-wrapper::after {
    display: none !important;
}

/* Dock More Options Popover Menu */
.dock-more-popover {
    position: absolute;
    bottom: calc(100% + 10px);
    right: 52px;
    left: auto;
    background: rgba(24, 26, 30, 0.94);
    -webkit-backdrop-filter: blur(24px);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 5px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.65);
    z-index: 90;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 170px;
    box-sizing: border-box;
}

.dock-more-item {
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #9ca3af; /* Grey as requested */
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    text-align: left;
    transition: all 0.15s ease;
    box-sizing: border-box;
}

.dock-more-item i {
    font-size: 13px;
    width: 16px;
    text-align: center;
    color: #9ca3af; /* Grey icon */
    transition: color 0.15s ease;
}

.dock-more-item span {
    color: #9ca3af;
    font-size: 11.5px;
    transition: color 0.15s ease;
}

.dock-more-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.dock-more-item:hover i,
.dock-more-item:hover span {
    color: #ffffff;
}

.dock-more-item.sharing-active {
    background: rgba(52, 199, 89, 0.15);
    border-radius: 8px;
}

.dock-more-item.sharing-active span,
.dock-more-item.sharing-active i {
    color: #34c759 !important;
}

.dock-more-item.sharing-active .screen-icon-wrapper::after {
    display: none !important;
}

.more-q-badge {
    font-size: 9.5px;
    padding: 1px 5px;
    border-radius: 4px;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin-left: auto;
}

.more-q-badge.hd {
    background: rgba(255, 255, 255, 0.10);
    color: #9ca3af;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.more-q-badge.sd {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.dock-more-item:hover .more-q-badge.hd {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
}

#btn-dock-more.active {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

.eye-btn-with-badge {
    position: relative;
}

.eye-badge {
    position: absolute;
    bottom: 2px;
    right: 2px;
    font-size: 8px;
    font-weight: 700;
    line-height: 1;
    color: #e5e7eb;
    background: rgba(18, 22, 28, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 4px;
    padding: 1px 2px;
    pointer-events: none;
    letter-spacing: -0.2px;
}

.control-btn.active .eye-badge {
    color: #9ca3af;
    border-color: rgba(255, 255, 255, 0.1);
}

.dock-more-item.eye-active i {
    color: #ffffff;
}

.dock-more-item.eye-active span {
    color: #e5e7eb;
}

.dock-more-item.eye-hidden i,
.dock-more-item.eye-hidden span {
    color: #6b7280 !important;
}

/* 80% Reduced Subtle User-Slash Watermark for Camera Off State (opacity: 0.20) */
.camera-blocked-watermark {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 6;
    background: transparent;
}

.camera-blocked-watermark i {
    font-size: 2.5rem;
    color: #9ca3af;
    opacity: 0.20; /* 80% opacity kam kar di gayi hai (subtle ghost watermark) */
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.3));
}

.remote-watermark i {
    font-size: 5rem;
    opacity: 0.20;
}



.quality-toggle-btn {
    font-weight: 800;
}

.quality-badge {
    font-size: 1.1rem;
    font-weight: 800;
    padding: 2px 4px;
    border-radius: 4px;
    line-height: 1;
}

.quality-badge.hd {
    color: #8ab4f8;
    background: rgba(138, 180, 248, 0.2);
    border: 1px solid rgba(138, 180, 248, 0.5);
    box-shadow: 0 0 8px rgba(138, 180, 248, 0.3);
}

.quality-badge.sd {
    color: #fbbc04;
    background: rgba(251, 188, 4, 0.2);
    border: 1px solid rgba(251, 188, 4, 0.5);
}

.badge-mini {
    position: absolute;
    top: -3px;
    right: -3px;
    background: #1a73e8;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #202124;
}

/* ==============================================================
   PARTICIPANTS SIDE SHEET (RIGHT SIDE, 80% WIDTH ON MOBILE)
   ============================================================== */

/* Backdrop overlay */
.sheet-backdrop {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    z-index: 9990;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.sheet-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

/* Drawer Container */
.participants-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    height: 100%;
    height: 100dvh;
    width: 380px;
    max-width: 90vw;
    background: #1e2126;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.65);
    z-index: 9999; /* ABOVE EVERYTHING */
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.33, 1, 0.68, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
}

.participants-drawer.open {
    transform: translateX(0) !important;
}

/* Drawer Header */
.drawer-header {
    padding: 16px 18px;
    background: #181a1e;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.drawer-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #e8eaed;
}

.participant-count-badge {
    background: rgba(138, 180, 248, 0.2);
    color: #8ab4f8;
    padding: 2px 7px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
}

.drawer-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.drawer-header-btn {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: #e8eaed;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: all 0.2s ease;
}

.drawer-header-btn:hover {
    background: rgba(138, 180, 248, 0.2);
    color: #8ab4f8;
    transform: scale(1.08);
}

.drawer-header-btn.active {
    background: rgba(10, 132, 255, 0.28);
    color: #0a84ff;
    box-shadow: 0 0 10px rgba(10, 132, 255, 0.4);
}

/* Subtle Mini Icons (Terminal & Info): 50% size & 50% opacity */
.drawer-mini-icon-btn {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    opacity: 0.50 !important;
    font-size: 7.5px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 0 !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.drawer-mini-icon-btn i {
    font-size: 8px !important;
}

.drawer-mini-icon-btn:hover {
    opacity: 1 !important;
    transform: scale(1.15) !important;
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
}

.drawer-mini-icon-btn.active {
    opacity: 0.95 !important;
    background: rgba(10, 132, 255, 0.25) !important;
    border-color: rgba(10, 132, 255, 0.5) !important;
}

.drawer-close-icon {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: #e8eaed;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    transition: background-color 0.2s, color 0.2s;
}

.drawer-close-icon:hover {
    background: #ea4335;
    color: #ffffff;
}

.refresh-list-btn {
    background: rgba(138, 180, 248, 0.12);
    border: 1px solid rgba(138, 180, 248, 0.3);
    color: #8ab4f8;
    width: 24px;
    height: 24px;
    padding: 0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    text-transform: none;
    letter-spacing: normal;
}

.refresh-list-btn:hover {
    background: rgba(138, 180, 248, 0.25);
    color: #ffffff;
    transform: scale(1.08);
}

@keyframes spin-anim {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spinning {
    animation: spin-anim 0.65s ease-in-out !important;
}

/* User Box inside Drawer */
.drawer-user-box {
    padding: 14px 18px;
    background: #24272c;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-sizing: border-box;
    width: 100%;
}

.drawer-label {
    font-size: 12px;
    font-weight: 500;
    color: #9aa0a6;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.drawer-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.drawer-input-row input {
    flex: 1 1 0%;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    background-color: #1a1c20;
    color: #e8eaed;
    outline: none;
    font-size: 14px;
}

.drawer-input-row input:focus {
    border-color: #8ab4f8;
}

.drawer-input-row button {
    flex: 0 0 auto;
    flex-shrink: 0;
    white-space: nowrap;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    background-color: #1a73e8;
    color: #ffffff;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: background-color 0.2s, transform 0.1s;
    box-sizing: border-box;
}

.drawer-input-row button:hover {
    background-color: #1557b0;
}

.drawer-input-row button:active {
    transform: scale(0.97);
}

/* Online Members List Container */
.drawer-list-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.drawer-list-header {
    padding: 12px 18px 8px 18px;
    font-size: 12px;
    font-weight: 600;
    color: #9aa0a6;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.caller-list {
    list-style: none;
    flex: 1;
    overflow-y: auto;
    padding: 4px 12px;
}

.caller-list li {
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.2s;
}

.caller-list li:hover {
    background: rgba(255, 255, 255, 0.08);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    min-width: 0;
    flex: 1;
}

.user-info span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background-color: #3c4043;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

/* Participant Device Platform Badge with Animated Glass Tooltip */
.participant-device-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    cursor: help;
    position: relative;
    flex-shrink: 0;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.participant-device-badge:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.28);
    transform: translateY(-1px) scale(1.12);
}

.participant-device-badge::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: rgba(15, 23, 42, 0.95);
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.participant-device-badge:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.participant-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.btn-action-call {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
    flex-shrink: 0;
    opacity: 0.65;
    backdrop-filter: blur(8px);
}

/* Status 1: Idle (Ready to call) - Bright Prominent Green Button */
.btn-action-call.status-idle {
    background: #22c55e !important;
    border-color: #16a34a !important;
    color: #ffffff !important;
    opacity: 1 !important;
    width: 36px;
    height: 36px;
    font-size: 13px;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.35);
}
.btn-action-call.status-idle:hover {
    background: #16a34a !important;
    border-color: #15803d !important;
    color: #ffffff !important;
    transform: scale(1.08);
}

/* Status 2: Active Call with this person - Soft Low Opacity Red (End Call) */
.btn-action-call.status-in-call {
    background: rgba(234, 67, 53, 0.22);
    border-color: rgba(234, 67, 53, 0.42);
    color: rgba(242, 139, 130, 0.9);
    opacity: 0.80;
    animation: inCallPulse 2.4s infinite ease-in-out;
}
.btn-action-call.status-in-call:hover {
    background: rgba(234, 67, 53, 0.35);
    border-color: rgba(234, 67, 53, 0.65);
    color: #fff;
    opacity: 1;
    transform: scale(1.06);
}

/* Status 3: Ringing / Connecting with this person - Soft Low Opacity Amber */
.btn-action-call.status-ringing {
    background: rgba(251, 188, 4, 0.20);
    border-color: rgba(251, 188, 4, 0.42);
    color: rgba(253, 214, 99, 0.9);
    opacity: 0.80;
    animation: ringingPulse 1.4s infinite ease-in-out;
}
.btn-action-call.status-ringing:hover {
    background: rgba(251, 188, 4, 0.32);
    color: #fff;
    opacity: 1;
}

/* Status 4: Disabled / In Call with someone else */
.btn-action-call.status-disabled {
    opacity: 0.25;
    pointer-events: none;
}

@keyframes inCallPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(234, 67, 53, 0); }
    50% { box-shadow: 0 0 8px 1px rgba(234, 67, 53, 0.35); }
}

@keyframes ringingPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(251, 188, 4, 0); }
    50% { transform: scale(1.05); box-shadow: 0 0 8px 1px rgba(251, 188, 4, 0.4); }
}

/* Participant Status Pill */
.participant-call-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 10px;
    margin-left: 6px;
    font-weight: 500;
}
.participant-call-pill.in-call {
    background: rgba(234, 67, 53, 0.15);
    color: #f28b82;
    border: 1px solid rgba(234, 67, 53, 0.3);
}
.participant-call-pill.ringing {
    background: rgba(251, 188, 4, 0.15);
    color: #fdd663;
    border: 1px solid rgba(251, 188, 4, 0.3);
}

/* Delete / Kick button - Soft Low Opacity */
.btn-action-delete {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background-color: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.38);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    transition: all 0.2s ease;
    opacity: 0.50;
    flex-shrink: 0;
}

.btn-action-delete:hover {
    background-color: rgba(234, 67, 53, 0.22);
    border-color: rgba(234, 67, 53, 0.4);
    color: #f28b82;
    opacity: 0.90;
    transform: scale(1.06);
}

.btn-peer-quality {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: none;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-peer-quality.hd {
    background: rgba(138, 180, 248, 0.2);
    color: #8ab4f8;
    border: 1px solid rgba(138, 180, 248, 0.4);
}

.btn-peer-quality.sd {
    background: rgba(251, 188, 4, 0.2);
    color: #fbbc04;
    border: 1px solid rgba(251, 188, 4, 0.4);
}

.status-indicator-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}
.status-indicator-dot.fast { background-color: #34a853; }
.status-indicator-dot.stable { background-color: #fbbc04; }

/* Drawer Bottom Close Footer */
.drawer-footer {
    padding: 14px 18px;
    padding-bottom: max(16px, env(safe-area-inset-bottom, 16px));
    background: #181a1e;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: center;
    box-sizing: border-box;
    flex-shrink: 0;
}

.drawer-footer-btn {
    width: 100%;
    padding: 11px 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    color: #e8eaed;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-sizing: border-box;
    transition: all 0.2s;
}

.drawer-footer-btn:hover {
    background: rgba(234, 67, 53, 0.2);
    color: #f28b82;
    border-color: #ea4335;
}

/* Active Call Floating Bar */
.active-call-bar {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(28, 31, 36, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 5px 12px;
    border-radius: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    color: #e8eaed;
    font-size: 12px;
}

.call-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #34a853;
    box-shadow: 0 0 8px #34a853;
    animation: pulseDot 1.8s infinite;
}

@keyframes pulseDot {
    0% { transform: scale(0.9); opacity: 0.8; }
    50% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.8; }
}

.call-bar-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: none;
    padding: 2px 7px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.call-bar-badge.hd {
    background: rgba(138, 180, 248, 0.2);
    color: #8ab4f8;
    border: 1px solid rgba(138, 180, 248, 0.4);
}

.call-bar-badge.sd {
    background: rgba(251, 188, 4, 0.2);
    color: #fbbc04;
    border: 1px solid rgba(251, 188, 4, 0.4);
}

.call-bar-end-badge {
    background: #ff3b30 !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    padding: 3px 10px !important;
    border-radius: 12px !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 8px rgba(255, 59, 48, 0.45);
    margin-left: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.call-bar-end-badge:hover {
    background: #e02d23 !important;
    transform: scale(1.04);
}

.dock-custom-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
    pointer-events: none;
    border-radius: 5px;
    vertical-align: middle;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
    transition: transform 0.2s ease;
}

.control-btn:hover .dock-custom-icon {
    transform: scale(1.08);
}

.floating-end-stream-btn {
    position: fixed;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9950;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(239, 68, 68, 0.5) !important;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.32);
    padding: 8px 22px;
    border-radius: 30px;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.35), 0 2px 8px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease, box-shadow 0.2s ease;
}

/* Shimmer animated sweep across End Sharing button */
.floating-end-stream-btn::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.42), transparent);
    animation: streamBtnShimmer 2.5s infinite;
    pointer-events: none;
}

@keyframes streamBtnShimmer {
    0% {
        left: -100%;
    }
    50%, 100% {
        left: 100%;
    }
}

/* Swiped-up auto-hidden state: smoothly translates up out of viewport */
.floating-end-stream-btn.swiped-up {
    transform: translate(-50%, -85px) !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.floating-end-stream-btn:hover {
    background: rgba(220, 38, 38, 0.85) !important;
    transform: translateX(-50%) scale(1.04);
    box-shadow: 0 6px 26px rgba(239, 68, 68, 0.65);
}

.floating-end-stream-btn:active {
    transform: translateX(-50%) scale(0.96);
}

/* Floating Toast Notification */
.toast-notice {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translate(-50%, -20px);
    background: rgba(43, 48, 56, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e5e7eb;
    padding: 10px 22px;
    border-radius: 18px;
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.45;
    letter-spacing: 0.25px;
    z-index: 100200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
    white-space: normal;
    text-align: center;
    width: max-content;
    max-width: min(92vw, 460px);
    word-break: break-word;
    overflow-wrap: anywhere;
    box-sizing: border-box;
}

.toast-notice.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* Incoming Chat Toast Notification (Bottom-Mid, 30% Opacity, Shimmer, Slide Up/Down) */
.chat-incoming-toast {
    position: fixed;
    bottom: 84px;
    left: 50%;
    transform: translate(-50%, 25px);
    opacity: 0;
    z-index: 100150;
    pointer-events: none;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    max-width: min(92vw, 380px);
    width: max-content;
}

.chat-incoming-toast.show {
    transform: translate(-50%, 0);
    opacity: 1;
    pointer-events: auto;
}

.chat-incoming-toast.dismissing {
    transform: translate(-50%, 25px);
    opacity: 0;
    pointer-events: none;
}

.chat-toast-content {
    background: rgba(18, 22, 28, 0.30); /* 30% subtle opacity as requested */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 10px 16px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    text-align: center;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.chat-incoming-toast:hover .chat-toast-content {
    background: rgba(18, 22, 28, 0.45);
    border-color: rgba(255, 255, 255, 0.22);
    transform: scale(1.02);
}

.chat-toast-top {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    line-height: 1.35;
    max-width: 100%;
}

.chat-toast-icon {
    color: #8ab4f8;
    font-size: 14px;
    flex-shrink: 0;
}

.chat-toast-text-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    overflow: hidden;
}

.chat-toast-sender {
    color: #f2f2f7;
    font-weight: 600;
    font-size: 13px;
    flex-shrink: 0;
}

.chat-toast-snippet {
    font-size: 13px;
    max-width: 210px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
}

.shimmer-text {
    background: linear-gradient(
        90deg,
        #9ca3af 0%,
        #ffffff 35%,
        #8ab4f8 50%,
        #ffffff 65%,
        #9ca3af 100%
    );
    background-size: 250% 100%;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: textShimmerSweep 2.2s ease-in-out infinite;
    font-weight: 600;
}

@keyframes textShimmerSweep {
    0% {
        background-position: 100% center;
    }
    100% {
        background-position: -100% center;
    }
}

.chat-toast-action {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}

.chat-toast-label {
    color: #9ca3af;
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.07);
    transition: all 0.2s ease;
}

.chat-incoming-toast:hover .chat-toast-label {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

@media (max-width: 600px) {
    .chat-incoming-toast {
        bottom: max(78px, calc(env(safe-area-inset-bottom, 0px) + 78px));
        max-width: calc(100vw - 28px);
    }
    .chat-toast-snippet {
        max-width: 170px;
    }
}

/* VRemote Companion Modal */
.vremote-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 100050;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.vremote-modal.active {
    display: flex;
}

.vremote-dialog {
    background: #1e2229;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 18px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
    overflow: hidden;
    animation: modalPop 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.vremote-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.vremote-body {
    padding: 18px;
}

.vremote-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.vremote-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 18px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.vremote-btn-primary {
    background: #3b82f6;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}

.vremote-btn-primary:active {
    background: #2563eb;
    transform: scale(0.98);
}

.vremote-btn-secondary {
    background: #2b303a;
    color: #e5e7eb;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.vremote-btn-secondary:active {
    background: #374151;
    transform: scale(0.98);
}

/* Remote Control Desktop Click Feedback Ripple */
.remote-click-ripple {
    position: fixed;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.4);
    border: 2px solid #3b82f6;
    transform: translate(-50%, -50%) scale(0.2);
    pointer-events: none;
    z-index: 100060;
    animation: remoteRippleAnim 0.6s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}

@keyframes remoteRippleAnim {
    0% {
        transform: translate(-50%, -50%) scale(0.2);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

/* Settings Modal */
.settings-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.settings-modal.active {
    display: flex;
}

.settings-dialog {
    background: #24272c;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    width: 90%;
    max-width: 440px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    animation: modalPop 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.settings-header {
    padding: 14px 18px;
    background: #1e2124;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #e8eaed;
}

.settings-header h3 {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
}

.settings-body {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: 70vh;
    overflow-y: auto;
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.setting-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.setting-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
}

.setting-label {
    font-size: 13px;
    font-weight: 500;
    color: #e8eaed;
}

.setting-desc {
    font-size: 11px;
    color: #9aa0a6;
    line-height: 1.35;
}

.setting-select {
    background: #3c4043;
    color: #e8eaed;
    border: 1px solid #5f6368;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 12px;
    outline: none;
    cursor: pointer;
    max-width: 190px;
}

.camera-diag-box {
    background: rgba(14, 17, 22, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 11px;
    color: #9ca3af;
    line-height: 1.45;
    font-family: monospace, ui-monospace, sans-serif;
    word-break: break-word;
    max-height: 95px;
    overflow-y: auto;
    user-select: text;
    -webkit-user-select: text;
}

.btn-diag-refresh {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #e5e7eb;
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 11px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s ease;
}

.btn-diag-refresh:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

/* Switch Toggle Slider */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #3c4043;
    transition: 0.3s;
    border-radius: 22px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #1a73e8;
}

input:checked + .slider:before {
    transform: translateX(18px);
}

/* ==============================================================
   INITIAL STEALTH SECURITY LOCK OVERLAY (7861 PIN + HOLD TO BACK)
   ============================================================== */
html.bypass-lock #security-lock-overlay,
html.bypass-lock .security-lock-overlay {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.security-lock-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 12, 16, 0.88);
    backdrop-filter: blur(36px) saturate(190%);
    -webkit-backdrop-filter: blur(36px) saturate(190%);
    z-index: 100050;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.security-lock-overlay.active {
    display: flex;
}

.security-lock-card {
    background: linear-gradient(150deg, #2b3038 0%, #1c1f26 50%, #12141a 100%);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 22px;
    padding: 34px 28px;
    max-width: 350px;
    width: 92%;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.05);
    color: #e5e7eb;
    position: relative;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    animation: securityCardPop 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes securityCardPop {
    0% { transform: scale(0.92); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.security-lock-icon {
    font-size: 32px;
    color: #9ca3af;
    margin-bottom: 14px;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}

.security-lock-title {
    font-size: 19px;
    font-weight: 700;
    color: #f3f4f6;
    margin: 0 0 6px 0;
    letter-spacing: 0.2px;
}

.security-lock-desc {
    font-size: 13px;
    color: #9ca3af;
    margin: 0 0 22px 0;
}

.security-pin-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 22px;
}

.security-pin-input {
    width: 140px;
    padding: 9px 12px;
    font-size: 22px;
    letter-spacing: 6px;
    text-align: center;
    background: rgba(14, 16, 21, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #ffffff;
    outline: none;
    -webkit-text-security: disc;
    text-security: disc;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.security-pin-input:focus {
    border-color: #9ca3af;
    box-shadow: 0 0 0 3px rgba(156, 163, 175, 0.25);
}

.btn-security-back {
    background: linear-gradient(145deg, #4b5563 0%, #374151 50%, #1f2937 100%);
    color: #f9fafb;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 22px;
    padding: 11px 32px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
    position: relative;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-security-back:hover {
    transform: scale(1.02);
}

.btn-security-back:active {
    transform: scale(0.98);
}

.btn-security-back.shake-error,
.security-pin-input.shake-error {
    animation: securityShake 0.4s ease-in-out;
}

@keyframes securityShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

/* Freeze Overlay (Soft Backdrop Blur) */
.freeze-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(18, 20, 26, 0.76);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.freeze-overlay.active {
    display: flex;
}

/* Dark Grey Theme Freeze Card (Decoy Error) */
.freeze-card {
    background: linear-gradient(150deg, #2b3038 0%, #1c1f26 50%, #12141a 100%);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 22px;
    padding: 34px 28px;
    max-width: 380px;
    width: 90%;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.05);
    color: #e5e7eb;
    position: relative;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    animation: securityCardPop 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.freeze-card h2 {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #f3f4f6;
    letter-spacing: -0.2px;
}

.freeze-card p {
    font-size: 13px;
    color: #9ca3af;
    line-height: 1.5;
    margin-bottom: 24px;
}

.shimmer-highlight {
    font-weight: 700;
    color: #f3f4f6;
    background: linear-gradient(90deg, #9ca3af 0%, #ffffff 50%, #9ca3af 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textShimmer 2.2s linear infinite;
    display: inline-block;
}

@keyframes textShimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Unfreeze Button with Stealth Hold */
.unfreeze-btn {
    background: linear-gradient(145deg, #4b5563 0%, #374151 50%, #1f2937 100%);
    color: #f9fafb;
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 11px 32px;
    font-size: 13px;
    border-radius: 22px;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
    position: relative;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.unfreeze-btn:hover {
    transform: scale(1.02);
}

.unfreeze-btn:active {
    transform: scale(0.98);
}

.unfreeze-btn.shake-error {
    animation: unfreezeShake 0.4s ease-in-out;
}

@keyframes unfreezeShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

/* ==============================================================
   RESPONSIVE OVERRIDES (MOBILE & TABLET)
   ============================================================== */

@media screen and (max-width: 768px) {
    /* Responsive drawer on mobile - comfortable 90vw width */
    .participants-drawer {
        width: 90vw !important;
        max-width: 92vw !important;
    }

    .drawer-header {
        padding: 14px 14px;
    }

    .drawer-user-box {
        padding: 12px 14px;
    }

    .drawer-input-row input {
        font-size: 13px;
        padding: 8px 10px;
    }

    .drawer-input-row button {
        padding: 8px 14px;
        font-size: 13px;
    }

    .drawer-list-header {
        padding: 10px 14px 6px 14px;
    }

    .caller-list {
        padding: 4px 8px;
    }

    .drawer-footer {
        padding: 12px 14px;
        padding-bottom: max(16px, env(safe-area-inset-bottom, 16px));
    }

    /* Pin local camera to top-right on mobile so bottom controls are completely free */
    .local-video {
        position: absolute;
        top: 14px;
        right: 14px;
        bottom: auto;
        left: auto;
        width: 95px;
        height: 135px;
        aspect-ratio: unset;
        border-radius: 10px;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
        border: 2px solid rgba(255, 255, 255, 0.25);
        z-index: 25;
    }

    .local-video.size-mini {
        width: 70px !important;
        height: 98px !important;
    }

    .local-video.size-normal {
        width: 95px !important;
        height: 135px !important;
    }

    .local-video.size-large {
        width: 130px !important;
        height: 185px !important;
    }

    .local-camera-overlay {
        opacity: 0.85;
        pointer-events: auto;
    }

    .local-resize-corner {
        opacity: 0.75;
    }

    .remote-video.active {
        position: absolute;
        top: 14px;
        right: 14px;
        bottom: auto;
        left: auto;
        width: 85px;
        height: 120px;
        aspect-ratio: unset;
        border-radius: 10px;
        z-index: 25;
    }

    .call-controls {
        bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        padding: 4px 6px;
        max-width: 85% !important;
        border-radius: 32px;
    }

    .controls-scroll-wrapper {
        gap: 6px;
        padding: 2px 2px;
    }

    .control-btn {
        width: 33px;
        height: 33px;
        min-width: 33px;
        font-size: 1.05rem;
    }

    .controls-static-action {
        padding-left: 5px;
        margin-left: 3px;
    }

    .floating-end-call-btn {
        bottom: calc(64px + env(safe-area-inset-bottom, 0px));
        height: 21px;
        padding: 1px 7px !important;
    }

    .floating-end-call-btn.dock-collapsed {
        bottom: calc(40px + env(safe-area-inset-bottom, 0px));
    }

    .dock-more-popover {
        right: 44px;
        left: auto;
        min-width: 155px;
    }

    .expand-bar-btn {
        bottom: 6px;
        font-size: 18px;
        min-width: 150px;
        height: 34px;
    }
}

/* ==============================================================
   VOLUME & SPEAKER CONTROLS (INCOMING AUDIO)
   ============================================================== */
.volume-popover {
    position: absolute;
    bottom: 68px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(28, 30, 34, 0.94);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    padding: 10px 14px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65);
    z-index: 60;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 230px;
    box-sizing: border-box;
}

.volume-popover-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
    color: #9aa0a6;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.popover-mute-link {
    background: transparent;
    border: none;
    color: #8ab4f8;
    font-size: 11px;
    cursor: pointer;
    font-weight: 600;
    padding: 0;
}

.popover-mute-link.is-muted {
    color: #ea4335;
}

.volume-popover-slider-row {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e8eaed;
}

.volume-range-input {
    flex: 1;
    accent-color: #8ab4f8;
    height: 6px;
    cursor: pointer;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.2);
}

.volume-val-badge {
    font-size: 11px;
    font-weight: 700;
    color: #8ab4f8;
    min-width: 34px;
    text-align: right;
}

.setting-volume-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 260px;
    justify-content: flex-end;
}

/* Volume row with Title & Description on Top, and Progress bar & Mute below */
.setting-item.setting-volume-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
}

.setting-item.setting-volume-row .setting-info {
    width: 100%;
}

.setting-item.setting-volume-row .setting-volume-controls {
    width: 100%;
    max-width: 100%;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.setting-item.setting-volume-row .volume-range-input {
    flex: 1;
    min-width: 0;
}

.setting-vol-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #e8eaed;
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}

.setting-vol-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.setting-vol-btn.is-muted {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.16);
    color: #9ca3af;
}

.control-btn.muted-speaker {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #9ca3af !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    box-shadow: none !important;
}

.call-bar-badge.muted-speaker {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #9ca3af !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

/* Speaker Mode States: Monochrome Gray Theme */
.control-btn.earpiece-speaker {
    background: rgba(255, 255, 255, 0.10) !important;
    color: #d1d5db !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    box-shadow: none !important;
}

.control-btn.audio-mode-active {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #e5e7eb !important;
    border: 1px solid rgba(255, 255, 255, 0.20) !important;
    box-shadow: none !important;
}

.control-btn.camera-blocked {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #9ca3af !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    box-shadow: none !important;
}

/* Remote Call Card (Audio Call Mode / Camera Blocked Screen - Monochrome Gray Theme) */
.remote-call-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #181b20 0%, #0d0f12 100%);
    z-index: 5;
    padding: 20px;
    text-align: center;
    animation: fadeInCallCard 0.3s ease-out;
}

@keyframes fadeInCallCard {
    from { opacity: 0; transform: scale(0.97); }
    to { opacity: 1; transform: scale(1); }
}

/* Circular Gray Avatar with ID inside */
.call-card-avatar-ring {
    position: relative;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: rgba(36, 40, 48, 0.90);
    border: 1.5px solid rgba(156, 163, 175, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.65), 0 0 20px rgba(156, 163, 175, 0.08);
}

.call-card-avatar-id {
    font-size: 22px;
    font-weight: 700;
    color: #e5e7eb;
    letter-spacing: 0.5px;
    z-index: 2;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
}

/* Gray Pulse Wave around Avatar */
.audio-wave-pulse {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 1.5px solid rgba(156, 163, 175, 0.35);
    transition: transform 0.08s ease-out, opacity 0.08s ease-out;
    pointer-events: none;
    opacity: 0.25;
}

/* Voice Activity Waves below Avatar (All in Gray) */
.call-card-audio-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 32px;
}

.call-card-audio-indicator .bar {
    width: 4px;
    height: 6px;
    background: linear-gradient(180deg, #e5e7eb 0%, #9ca3af 100%);
    border-radius: 3px;
    transition: height 0.05s ease-out, opacity 0.05s ease-out;
    opacity: 0.35;
}

/* ==============================================================
   TRANSPARENT FLOATING CHAT OVERLAY SYSTEM
   ============================================================== */
.chat-overlay-container {
    position: absolute;
    top: 10%; /* Kept 10% below top border as requested */
    bottom: 95px;
    left: 16px;
    width: min(440px, calc(100% - 32px));
    display: flex;
    flex-direction: column;
    background: transparent !important;
    pointer-events: none;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 600px) {
    .toast-notice {
        top: max(env(safe-area-inset-top, 14px), 14px);
        max-width: calc(100vw - 24px);
        padding: 9px 16px;
        font-size: 13px;
        border-radius: 14px;
    }

    .chat-overlay-container {
        top: max(10%, calc(env(safe-area-inset-top, 0px) + 10%));
        bottom: 90px;
        left: 6px;
        width: calc(100% - 12px);
    }
}

.chat-bar-above-input {
    pointer-events: auto;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 2px 0 6px 0;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    user-select: none;
    -webkit-user-select: none;
}

.chat-bar-above-input .chat-pulse-indicator {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #00e676;
    box-shadow: 0 0 6px #00e676;
    animation: chatPulse 1.8s infinite ease-in-out;
    flex-shrink: 0;
}

@keyframes chatPulse {
    0% { transform: scale(0.9); opacity: 0.8; }
    50% { transform: scale(1.35); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.8; }
}

.chat-bar-above-input .chat-peer-id {
    font-size: 11px;
    font-weight: 500;
    color: #e5e7eb;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
    letter-spacing: 0.3px;
}

.chat-bar-above-input .chat-sep {
    font-size: 11px;
    font-weight: 400;
    color: #9ca3af;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.btn-chat-close-text {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 0;
    margin: 0;
    font-size: 11px;
    font-weight: 500;
    color: #e5e7eb;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
    cursor: pointer;
    transition: color 0.15s ease, opacity 0.15s ease;
}

.btn-chat-close-text:hover {
    color: #ffffff;
    text-decoration: underline;
}

.btn-chat-close-text:active {
    opacity: 0.6;
}

/* Chat Messages Stream: Pure Transparent, Strong Black Text-Shadow */
.chat-messages-scroll {
    flex: 1;
    min-height: 0; /* CRITICAL: flex child must have min-height:0 for scroll to work on desktop */
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 6px 4px 12px 4px;
    background: transparent !important;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
    -webkit-overflow-scrolling: touch;
    pointer-events: auto; /* CRITICAL: Allows mouse wheel scroll on desktop without hitting messages */
}

.chat-messages-scroll::-webkit-scrollbar {
    width: 4px;
}

.chat-messages-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 4px;
}

/* Individual Message: Completely Transparent - No Box Container */
.chat-msg {
    pointer-events: auto;
    position: relative;
    max-width: 85%;
    padding: 2px 4px;
    margin-bottom: 6px;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    display: flex;
    flex-direction: column;
    transition: transform 0.15s ease;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

.chat-msg:active {
    transform: scale(0.98);
}

/* Sender (My message) - Right side (Transparent, Light Tint) */
.chat-msg.mine {
    align-self: flex-end;
    margin-left: auto;
    text-align: right;
    align-items: flex-end;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Receiver (Peer message) - Left side (Transparent, White) */
.chat-msg.peer {
    align-self: flex-start;
    margin-right: auto;
    text-align: left;
    align-items: flex-start;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.chat-msg-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 3px;
    margin-bottom: 2px;
    font-size: 10px;
}

.chat-msg.mine .chat-msg-meta {
    justify-content: flex-end;
}

.chat-msg.peer .chat-msg-meta {
    justify-content: flex-start;
}

.chat-sender-name {
    display: none;
}

.chat-msg-time {
    color: #9ca3af !important;
    font-size: 10px;
    font-weight: 400;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.6);
}

/* Words Styling: Subtle Hairline Stroke Outline (Not Over-highlighted) */
.chat-msg-text {
    font-size: 14px;
    line-height: 1.45;
    font-weight: 500;
    color: #d1d5db !important;
    word-break: break-word;
    white-space: pre-wrap;
    /* Clean, fine hairline stroke without heavy dark drop shadows */
    -webkit-text-stroke: 0.35px rgba(0, 0, 0, 0.7);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
    transition: font-size 0.2s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
}

/* Sent (My message) - Crisp white with light hairline stroke */
.chat-msg.mine .chat-msg-text {
    color: #f3f4f6 !important;
}

/* Received (Peer message) - Subtle gray with light hairline stroke */
.chat-msg.peer .chat-msg-text {
    color: #d1d5db !important;
}

/* Click-to-Magnify / Highlight: Readable without muddy blur */
.chat-msg.magnified .chat-msg-text {
    font-size: 18px !important;
    line-height: 1.45 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    -webkit-text-stroke: 0.45px rgba(0, 0, 0, 0.85);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

/* Attachments in Chat */
.chat-msg-attachment {
    margin-top: 6px;
    border-radius: 10px;
    overflow: hidden;
}

/* Chat Media Loader (For outgoing & incoming images / videos) */
.chat-media-wrapper {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    min-width: 160px;
    min-height: 80px;
    display: inline-block;
}

.chat-media-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 18px 22px;
    background: linear-gradient(135deg, rgba(18, 22, 30, 0.92), rgba(28, 34, 46, 0.92));
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    color: #e5e7eb;
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.55);
}

/* Beautiful Circular Progress Indicator Line Spinner */
.circular-progress-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top-color: #3b82f6;
    border-right-color: #60a5fa;
    border-radius: 50%;
    animation: circularProgressSpin 0.85s linear infinite;
    display: inline-block;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
}

@keyframes circularProgressSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Shimmer Loading Text */
.loader-shimmer-text {
    background: linear-gradient(90deg, #9ca3af 0%, #ffffff 50%, #9ca3af 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textShimmerAnim 1.8s infinite linear;
    letter-spacing: 0.3px;
    font-weight: 600;
    font-size: 11.5px;
}

@keyframes textShimmerAnim {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes fa-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.chat-media-loader i.fa-spin {
    font-size: 22px;
    color: #60a5fa;
    animation: fa-spin 1s infinite linear;
}

.chat-img-thumb {
    max-width: 230px;
    max-height: 200px;
    width: auto;
    height: auto;
    border-radius: 8px;
    display: block;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.6);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.chat-img-thumb:hover {
    transform: scale(1.02);
}

.chat-video-player {
    max-width: 260px;
    max-height: 220px;
    min-width: 190px;
    min-height: 130px;
    border-radius: 10px;
    background: #000;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
    outline: none;
    display: block;
    object-fit: contain;
}

/* Strictly hide Chrome/Chromium native Picture-in-Picture controls on chat video players */
.chat-video-player::-webkit-media-controls-picture-in-picture-button {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

.chat-video-player::-webkit-media-controls-remote-playback-button {
    display: none !important;
}

/* Chat Video Loading Card & Animated Progress Bar */
.chat-video-loader-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 20px;
    min-width: 210px;
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.95), rgba(31, 41, 55, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.chat-video-loader-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #e5e7eb;
}

.chat-video-loader-header i {
    color: #60a5fa;
    font-size: 14px;
    animation: videoPulseGlow 1.5s infinite ease-in-out;
}

@keyframes videoPulseGlow {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.15); filter: drop-shadow(0 0 6px #3b82f6); }
}

.chat-video-progress-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
}

.chat-video-progress-bar {
    width: 45%;
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #38bdf8, #60a5fa, #2563eb);
    background-size: 200% 100%;
    border-radius: 999px;
    animation: videoProgressBarSweep 1.4s infinite ease-in-out;
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
}

@keyframes videoProgressBarSweep {
    0% { transform: translateX(-100%); }
    50% { width: 65%; }
    100% { transform: translateX(250%); width: 45%; }
}

.chat-video-progress-subtext {
    font-size: 10.5px;
    color: #94a3b8;
    font-weight: 500;
    letter-spacing: 0.2px;
}

.chat-doc-card {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    padding: 8px 12px;
    text-decoration: none;
    color: #ffffff;
    transition: background 0.2s ease;
}

.chat-doc-card:hover {
    background: rgba(0, 0, 0, 0.65);
}

.chat-doc-icon {
    font-size: 22px;
    color: #64b5f6;
}

.chat-doc-info {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.chat-doc-name {
    font-size: 12px;
    font-weight: 700;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: 0 1px 2px #000;
}

.chat-doc-size {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.7);
    text-shadow: 0 1px 2px #000;
}

.chat-doc-download-icon {
    font-size: 14px;
    color: #69f0ae;
    margin-left: 4px;
}

/* WhatsApp-Style Message Reaction Badge */
.chat-reaction-badge {
    position: absolute;
    bottom: -8px;
    background: rgba(24, 28, 36, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 1px 6px;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    color: #ffffff;
    animation: popReaction 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

.chat-msg.mine .chat-reaction-badge {
    right: 8px;
}

.chat-msg.peer .chat-reaction-badge {
    left: 8px;
}

@keyframes popReaction {
    0% { transform: scale(0.4); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* WhatsApp-style Floating Emoji Reaction Bar on Hold/Long-press */
.chat-reaction-bar {
    pointer-events: auto;
    position: absolute;
    background: rgba(20, 24, 32, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 28px;
    padding: 4px 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
    z-index: 1050;
    animation: popReactionBar 0.18s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popReactionBar {
    0% { transform: scale(0.6) translateY(10px); opacity: 0; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

.reaction-emoji-btn {
    background: transparent;
    border: none;
    font-size: 22px;
    padding: 3px;
    cursor: pointer;
    transition: transform 0.15s ease;
    line-height: 1;
}

.reaction-emoji-btn:hover, .reaction-emoji-btn:active {
    transform: scale(1.35);
}

/* Attachment Menu Popover */
.chat-attachment-popover {
    pointer-events: auto;
    position: absolute;
    bottom: 52px;
    left: 0;
    background: rgba(20, 25, 34, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.65);
    z-index: 1040;
    min-width: 170px;
    animation: popReactionBar 0.18s ease-out;
}

.attachment-action-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s ease;
    color: #ffffff;
}

.attachment-action-item:hover {
    background: rgba(255, 255, 255, 0.12);
}

.attachment-action-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #ffffff;
}

.camera-bg { background: linear-gradient(135deg, #00b09b, #96c93d); }
.video-rec-bg { background: linear-gradient(135deg, #ff416c, #ff4b2b); }
.media-bg { background: linear-gradient(135deg, #8a2387, #e94057, #f27121); }
.doc-bg { background: linear-gradient(135deg, #2193b0, #6dd5ed); }

.attachment-action-text {
    font-size: 13px;
    font-weight: 600;
}

/* In-Chat Photo Capture Viewfinder Modal */
.chat-photo-capture {
    pointer-events: auto;
    position: absolute;
    bottom: 52px;
    left: 0;
    width: 290px;
    background: rgba(18, 22, 29, 0.96);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 12px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.7);
    z-index: 1045;
    display: flex;
    flex-direction: column;
    gap: 10px;
    animation: popReactionBar 0.2s ease-out;
}

.cpc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 700;
    color: #e5e7eb;
}

.cpc-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cpc-preview-wrap {
    position: relative;
    width: 100%;
    height: 190px;
    background: #000000;
    border-radius: 12px;
    overflow: hidden;
}

.cpc-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cpc-captured-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cpc-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.cpc-shutter-btn {
    background: #3b82f6;
    color: #ffffff;
    font-weight: 700;
}
.cpc-shutter-btn:hover {
    background: #2563eb;
}

/* In-Chat Video Recorder Modal */
.chat-video-recorder {
    pointer-events: auto;
    position: absolute;
    bottom: 52px;
    left: 0;
    width: 290px;
    background: rgba(18, 22, 29, 0.96);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 12px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.7);
    z-index: 1045;
    display: flex;
    flex-direction: column;
    gap: 10px;
    animation: popReactionBar 0.2s ease-out;
}

.cvr-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 700;
    color: #e5e7eb;
}

.cvr-preview-wrap {
    position: relative;
    width: 100%;
    height: 180px;
    background: #000000;
    border-radius: 12px;
    overflow: hidden;
}

.cvr-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cvr-timer {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.65);
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 10px;
    font-variant-numeric: tabular-nums;
}

.cvr-rec-dot {
    position: absolute;
    top: 11px;
    left: 10px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 8px #ef4444;
    animation: pulseRecDot 1s infinite alternate ease-in-out;
}

@keyframes pulseRecDot {
    from { opacity: 0.3; transform: scale(0.85); }
    to { opacity: 1; transform: scale(1.15); }
}

.cvr-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.cvr-btn {
    border: none;
    outline: none;
    padding: 7px 13px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
}

.cvr-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: #e5e7eb;
}
.cvr-cancel:hover {
    background: rgba(255, 255, 255, 0.2);
}

.cvr-record {
    background: #ef4444;
    color: #ffffff;
}
.cvr-record:hover {
    background: #dc2626;
}

.cvr-stop {
    background: #f59e0b;
    color: #000000;
    font-weight: 700;
}
.cvr-stop:hover {
    background: #d97706;
}

.cvr-send {
    background: #10b981;
    color: #ffffff;
}
.cvr-send:hover {
    background: #059669;
}

.cvr-retake {
    background: rgba(255, 255, 255, 0.12);
    color: #e5e7eb;
}
.cvr-retake:hover {
    background: rgba(255, 255, 255, 0.22);
}

/* Emoji Drawer Popover */
.chat-emoji-drawer {
    pointer-events: auto;
    position: absolute;
    bottom: 52px;
    left: 36px;
    background: rgba(20, 25, 34, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    padding: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.65);
    z-index: 1040;
    width: 280px;
    max-height: 220px;
    display: flex;
    flex-direction: column;
    animation: popReactionBar 0.18s ease-out;
}

.emoji-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    overflow-y: auto;
    max-height: 170px;
}

.emoji-pick-btn {
    background: transparent;
    border: none;
    font-size: 20px;
    padding: 4px;
    cursor: pointer;
    border-radius: 6px;
    transition: transform 0.1s ease, background 0.1s ease;
    line-height: 1;
}

.emoji-pick-btn:hover {
    transform: scale(1.25);
    background: rgba(255, 255, 255, 0.15);
}

/* Pending Attachment Pill */
.chat-pending-attachment {
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(18, 22, 30, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    padding: 6px 12px;
    margin-bottom: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.pending-preview-content {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
}

.pending-img-preview {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 6px;
}

.pending-doc-icon {
    font-size: 18px;
    color: #64b5f6;
}

.pending-meta {
    display: flex;
    flex-direction: column;
}

.pending-file-name {
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pending-file-size {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.65);
}

.pending-remove-btn {
    background: transparent;
    border: none;
    color: #ff5252;
    cursor: pointer;
    padding: 4px 6px;
    font-size: 13px;
    border-radius: 6px;
}

/* Chat Input Bar */
.chat-input-bar {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(18, 22, 28, 0.78);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 26px;
    padding: 4px 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.chat-tool-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.85);
    font-size: 16px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.chat-tool-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.chat-text-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    outline: none;
    padding: 6px 4px;
    text-shadow: 0 1px 2px #000;
}

.chat-text-input::placeholder {
    color: rgba(255, 255, 255, 0.55);
}

.chat-send-btn {
    background: #00e676;
    border: none;
    color: #003314;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0, 230, 118, 0.4);
    transition: all 0.2s ease;
}

.chat-send-btn:hover {
    background: #69f0ae;
    transform: scale(1.05);
}

.chat-unread-badge {
    background: #ff5252 !important;
    color: #fff !important;
    font-weight: bold;
}

/* Lightbox Modal */
.chat-image-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.8);
    object-fit: contain;
}

.lightbox-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    font-size: 22px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
}

.lightbox-download-btn {
    margin-top: 16px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 8px 18px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* ============================================================
   Decoy Security Toast (Center-Mid Screen Deceptive Alert)
   ============================================================ */
.decoy-security-toast {
    position: fixed;
    top: 36%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.94);
    background: rgba(18, 20, 26, 0.94);
    border: 1px solid rgba(234, 67, 53, 0.45);
    color: #fca5a5;
    padding: 12px 22px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.2px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.7), 0 0 20px rgba(234, 67, 53, 0.18);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 10099;
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: opacity 0.22s cubic-bezier(0.2, 0, 0, 1), transform 0.22s cubic-bezier(0.2, 0, 0, 1);
    opacity: 0;
    max-width: 90vw;
    text-align: center;
}

.decoy-security-toast.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.decoy-toast-icon {
    font-size: 16px;
    color: #ef4444;
    flex-shrink: 0;
}

/* ============================================================
   Minimal Transparent Incoming Call Row (10px above bottom bar)
   Format: ID : [CallIcon] [EndIcon] - No Background, No Outline
   ============================================================ */
.incoming-call-bar {
    position: fixed;
    bottom: 74px; /* Exactly 10px above .call-controls */
    left: 50%;
    transform: translateX(-50%);
    z-index: 10040;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    pointer-events: auto;
}

/* Row with 10px gap between items */
.incoming-call-minimal {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Shimmer Effect in Black, Gray & White */
.shimmer-row {
    position: relative;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 1px rgba(0, 0, 0, 0.9));
}

.incoming-id-text {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    background: linear-gradient(90deg, #9ca3af 0%, #ffffff 35%, #4b5563 65%, #9ca3af 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmerTextSweep 2.2s infinite linear;
}

.incoming-sep {
    font-size: 13px;
    font-weight: 700;
    color: #9ca3af;
    opacity: 0.75;
}

/* Call Icon (White to Gray Shimmer / Pulse) */
.btn-incoming-call-icon {
    background: none !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 2px 4px !important;
    margin: 0 !important;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    animation: whiteGrayPulse 2s infinite ease-in-out;
    transition: transform 0.15s ease, color 0.15s ease;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
    outline-offset: 2px;
    touch-action: none;
}

@keyframes whiteGrayPulse {
    0% {
        color: #ffffff;
        filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.7));
    }
    50% {
        color: #6b7280; /* dark/gray */
        filter: drop-shadow(0 0 1px rgba(107, 114, 128, 0.4));
    }
    100% {
        color: #ffffff;
        filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.7));
    }
}

.btn-incoming-call-icon:hover {
    color: #ffffff;
    transform: scale(1.18);
}

.btn-incoming-call-icon.holding {
    color: #ffffff !important;
    transform: scale(1.25);
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 1)) !important;
}

/* End / Cross Icon */
.btn-incoming-end-icon {
    background: none !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 2px 4px !important;
    margin: 0 !important;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    opacity: 0.75;
    transition: transform 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.btn-incoming-end-icon:hover {
    color: #ef4444;
    opacity: 1;
    transform: scale(1.18);
}

@keyframes shimmerTextSweep {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

/* Shake button animation on single click / early abort */
.shake-error {
    animation: btnClickShake 0.4s ease;
}

@keyframes btnClickShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-4px) rotate(-3deg); }
    40% { transform: translateX(4px) rotate(3deg); }
    60% { transform: translateX(-3px) rotate(-2deg); }
    80% { transform: translateX(3px) rotate(2deg); }
}

/* ============================================================
   Remote Camera Floating PiP Window (Dual Stream during Screen Share)
   ============================================================ */
.remote-camera-pip {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 240px;
    height: 160px;
    min-width: 140px;
    min-height: 95px;
    max-width: 80vw;
    max-height: 70vh;
    border-radius: 16px;
    background: rgba(18, 22, 31, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.65), 0 0 15px rgba(59, 130, 246, 0.2);
    z-index: 10035;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    user-select: none;
    touch-action: none;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.remote-camera-pip.minimized {
    height: 40px !important;
    width: 180px !important;
}

.remote-camera-pip.minimized .pip-body,
.remote-camera-pip.minimized .pip-resize-corner {
    display: none !important;
}

.pip-header {
    height: 36px;
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.45);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    cursor: grab;
    cursor: -webkit-grab;
}

.pip-header:active {
    cursor: grabbing;
    cursor: -webkit-grabbing;
}

.pip-title {
    font-size: 11.5px;
    font-weight: 600;
    color: #93c5fd;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pip-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pip-action-btn {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: #e5e7eb;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.pip-action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: scale(1.08);
}

.pip-body {
    flex: 1;
    position: relative;
    background: #000;
    overflow: hidden;
}

.pip-body video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pip-resize-corner {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 18px;
    height: 18px;
    cursor: nwse-resize;
    z-index: 10;
    background: linear-gradient(135deg, transparent 50%, rgba(255, 255, 255, 0.45) 50%);
    border-bottom-right-radius: 16px;
}


/* ==============================================================
   CUPERTINO iOS STYLE: DEVICE REGISTRY & GALLERY
   ============================================================== */
.cupertino-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9920;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}

.cupertino-modal-card {
    width: min(520px, 96vw);
    max-height: 86vh;
    background: #1c1c1e;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: cupertinoPop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-card-size {
    width: min(720px, 96vw);
    max-height: 90vh;
}

@keyframes cupertinoPop {
    from {
        opacity: 0;
        transform: scale(0.94);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.cupertino-modal-header {
    padding: 12px 16px;
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(28, 28, 30, 0.85);
    backdrop-filter: blur(10px);
    flex-shrink: 0;
}

.cupertino-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cupertino-title {
    font-size: 15px;
    font-weight: 600;
    color: #f2f2f7;
    letter-spacing: -0.2px;
}

.cupertino-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cupertino-icon-btn {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    border-radius: 50%;
    color: #8e8e93;
    width: 28px;
    height: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.15s ease;
}

.cupertino-icon-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

.cupertino-nav-btn {
    background: rgba(0, 122, 255, 0.15);
    border: 1px solid rgba(0, 122, 255, 0.3);
    color: #0a84ff;
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.cupertino-nav-btn:hover {
    background: rgba(0, 122, 255, 0.3);
    color: #ffffff;
}

.cupertino-page-badge {
    font-size: 11px;
    color: #8e8e93;
    font-weight: 500;
    padding: 0 4px;
}

.cupertino-self-banner {
    padding: 10px 16px;
    background: rgba(0, 122, 255, 0.08);
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.cupertino-self-tag {
    font-size: 9px;
    color: #0a84ff;
    font-weight: 700;
    letter-spacing: 0.6px;
    margin-bottom: 2px;
}

.cupertino-self-id {
    font-size: 13px;
    color: #f2f2f7;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, monospace;
}

.cupertino-self-sub {
    font-size: 11px;
    color: #8e8e93;
    margin-top: 2px;
}

.cupertino-list-scroll {
    overflow-y: auto;
    flex: 1;
    padding: 6px 10px;
}

.cupertino-device-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cupertino-empty-state {
    text-align: center;
    padding: 32px 16px;
    color: #8e8e93;
    font-size: 13px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

/* Cupertino Device Card */
.cupertino-device-row {
    background: #2c2c2e;
    border: 0.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: background 0.15s ease;
}

.cupertino-device-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.cupertino-device-meta {
    flex: 1;
    min-width: 0;
}

.cupertino-device-title-line {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cupertino-online-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.cupertino-online-dot.online {
    background: #34c759;
    box-shadow: 0 0 6px rgba(52, 199, 89, 0.6);
}

.cupertino-online-dot.offline {
    background: #636366;
}

.cupertino-device-name {
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cupertino-device-badges {
    font-size: 10px;
    color: #8e8e93;
    margin-top: 2px;
    line-height: 1.35;
}

.cupertino-device-badges span.id-code {
    color: #0a84ff;
    font-family: monospace;
    font-weight: 500;
}

.cupertino-device-badges span.dim {
    color: #636366;
    margin: 0 3px;
}

/* Delete device (trash -> inline check / cross confirm) */
.cupertino-device-side {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.device-delete-btn {
    width: 27px;
    height: 27px;
    padding: 0;
    border-radius: 9px;
    border: 1px solid rgba(255, 69, 58, 0.3);
    background: rgba(255, 69, 58, 0.1);
    color: #ff453a;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}

.device-delete-btn:hover {
    background: rgba(255, 69, 58, 0.22);
}

.device-delete-btn:active,
.device-confirm-btn:active {
    transform: scale(0.92);
}

.device-delete-confirm {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.device-confirm-btn {
    width: 27px;
    height: 27px;
    padding: 0;
    border-radius: 9px;
    border: 1px solid transparent;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
}

.device-confirm-btn.yes {
    background: rgba(52, 199, 89, 0.18);
    border-color: rgba(52, 199, 89, 0.45);
    color: #34c759;
}

.device-confirm-btn.yes:hover {
    background: rgba(52, 199, 89, 0.3);
}

.device-confirm-btn.no {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.14);
    color: #a1a1a6;
}

.device-confirm-btn.no:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* 6-Button Cupertino Action Grid */
.cupertino-actions-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
}

@media (max-width: 520px) {
    .cupertino-actions-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 5px;
    }
}

.dev-action-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 0.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 9px;
    color: #f2f2f7;
    font-size: 10px;
    font-weight: 500;
    padding: 6px 3px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    transition: all 0.15s ease;
    user-select: none;
}

.dev-action-btn:active {
    transform: scale(0.95);
}

.dev-action-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

.dev-action-btn i {
    font-size: 12px;
}

.dev-action-btn span {
    font-size: 9.5px;
    color: #aeaeb2;
}

/* Specific button colors (iOS palette) */
.dev-action-btn.btn-act-call i { color: #34c759; }
.dev-action-btn.btn-act-video i { color: #007aff; }
.dev-action-btn.btn-act-share i { color: #ff9f0a; }
.dev-action-btn.btn-act-control i { color: #af52de; }
.dev-action-btn.btn-act-gallery i { color: #30d158; }
.dev-action-btn.btn-act-videos i { color: #ff375f; }

.dev-action-btn.offline-disabled {
    opacity: 1 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* Loading & Connecting State on Action Buttons */
.dev-action-btn.btn-action-loading {
    background: rgba(10, 132, 255, 0.22) !important;
    border-color: #0a84ff !important;
    pointer-events: none !important;
    cursor: wait !important;
    animation: btnLoadingPulse 1.2s infinite ease-in-out;
}

.dev-action-btn.btn-action-loading i {
    color: #60a5fa !important;
    animation: fa-spin 1s infinite linear;
}

.dev-action-btn.btn-action-loading span {
    color: #93c5fd !important;
    font-weight: 700 !important;
}

@keyframes btnLoadingPulse {
    0%, 100% { box-shadow: 0 0 4px rgba(10, 132, 255, 0.3); }
    50% { box-shadow: 0 0 12px rgba(10, 132, 255, 0.7); }
}

/* Failed / Orange Highlight State */
.dev-action-btn.btn-action-failed {
    border-color: #ff9f0a !important;
    background: rgba(255, 159, 10, 0.18) !important;
}

.dev-action-btn.btn-action-failed i {
    color: #ff9f0a !important;
}

/* Orange Error Box under device card */
.cupertino-device-error-box {
    margin-top: 6px;
    padding: 7px 11px;
    background: rgba(255, 159, 10, 0.12);
    border: 1px solid rgba(255, 159, 10, 0.55);
    border-radius: 9px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: btnClickShake 0.4s ease;
}

.cupertino-device-error-box i {
    color: #ff9f0a;
    font-size: 13px;
    flex-shrink: 0;
}

.cupertino-device-error-box .error-reason-text {
    color: #ff9f0a;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.35;
    word-break: break-word;
}

.cupertino-modal-footer {
    padding: 8px 16px;
    border-top: 0.5px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    font-size: 10px;
    color: #636366;
    flex-shrink: 0;
}

/* Cupertino Gallery Grid (50 items) */
.cupertino-gallery-grid {
    overflow-y: auto;
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 6px;
    padding: 10px;
    background: #151517;
}

.cupertino-gallery-cell {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: #242426;
    border: 0.5px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cupertino-gallery-cell:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    border-color: rgba(0, 122, 255, 0.5);
}

.cupertino-gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cupertino-gallery-ph {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #48484a;
    font-size: 1.6rem;
}

.cupertino-gallery-dur {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.75);
    color: #ffffff;
    font-size: 9px;
    font-weight: 600;
    padding: 1px 4px;
    border-radius: 4px;
}

.cupertino-gallery-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 3px 5px;
    font-size: 9px;
    color: #ffffff;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cupertino-gallery-dl {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    color: #ffffff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    opacity: 0;
    transition: opacity 0.15s ease;
    cursor: pointer;
}

.cupertino-gallery-cell:hover .cupertino-gallery-dl {
    opacity: 1;
}

.cupertino-gallery-dl:hover {
    background: #007aff;
    transform: scale(1.1);
}

/* ---- Custom in-grid video player (download / play / pause) ---- */
/* A soft scrim keeps the three buttons readable over bright thumbnails. */
.cupertino-gallery-cell::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 46%;
    height: 42%;
    background: linear-gradient(225deg, rgba(0, 0, 0, 0.48) 0%, rgba(0, 0, 0, 0.18) 52%, rgba(0, 0, 0, 0) 82%);
    pointer-events: none;
    z-index: 5;
    opacity: 0.9;
}

.cupertino-gallery-controls {
    position: absolute;
    top: 3px;
    right: 3px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    z-index: 6;
}

.cupertino-gallery-ctrl {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.62);
    color: #ffffff;
    border: 0.5px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    transition: background 0.15s ease, transform 0.12s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.cupertino-gallery-ctrl:hover {
    background: #007aff;
    transform: scale(1.1);
}

.cupertino-gallery-ctrl:active {
    transform: scale(0.92);
}

.cupertino-gallery-ctrl.is-active {
    background: #0a84ff;
    box-shadow: 0 0 0 2px rgba(10, 132, 255, 0.35);
}

.cupertino-gallery-inline-player {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
    display: block;
    z-index: 3;
    cursor: zoom-in;
}

.cupertino-gallery-cell.is-playing .cupertino-gallery-name,
.cupertino-gallery-cell.is-playing .cupertino-gallery-dur {
    display: none;
}

.cupertino-gallery-cell.is-expanded {
    grid-column: 1 / -1;
    aspect-ratio: 16 / 9;
    max-height: 62vh;
    z-index: 8;
    border-color: rgba(10, 132, 255, 0.65);
    box-shadow: 0 10px 34px rgba(0, 0, 0, 0.55);
}

.cupertino-gallery-cell.is-expanded .cupertino-gallery-inline-player {
    cursor: zoom-out;
}

/* --- Loader shown while the full clip travels from the phone --- */
.cupertino-gallery-loader {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.62);
    color: #ffffff;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.cupertino-gallery-loader i {
    font-size: 18px;
    color: #0a84ff;
}

@media (hover: none) {
    /* Touch devices never hover, so keep all three controls visible. */
    .cupertino-gallery-controls {
        opacity: 1;
    }
    .cupertino-gallery-dl {
        opacity: 1;
    }
    .cupertino-gallery-ctrl {
        width: 26px;
        height: 26px;
        font-size: 11px;
    }
}

/* HD Live Preview Modal Styles */
.hd-preview-card {
    width: min(880px, 96vw);
    max-height: 92vh;
}

.preview-content-area {
    overflow: auto;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #08080a;
    padding: 12px;
    position: relative;
    min-height: 280px;
}

/* Cupertino Camera Selector in Device Card */
.cupertino-cam-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 6px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 8px;
    border: 0.5px solid rgba(255, 255, 255, 0.05);
    margin-top: 2px;
}

.cupertino-cam-label {
    font-size: 10px;
    color: #8e8e93;
    display: flex;
    align-items: center;
    gap: 4px;
}

.cupertino-cam-options {
    display: flex;
    align-items: center;
    gap: 3px;
}

.cupertino-cam-pill {
    background: rgba(255, 255, 255, 0.06);
    border: 0.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    color: #8e8e93;
    font-size: 9.5px;
    font-weight: 500;
    padding: 2px 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.cupertino-cam-pill:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.cupertino-cam-pill.selected {
    background: #0a84ff;
    color: #ffffff;
    border-color: #0a84ff;
    box-shadow: 0 0 6px rgba(10, 132, 255, 0.5);
}

/* Dedicated Inline Drawer Devices Container (Strictly inside sheet, scrollable, never hides participants) */
.drawer-devices-container {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(15, 17, 21, 0.85);
    box-shadow: inset 0 -2px 10px rgba(0, 0, 0, 0.4);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.drawer-devices-container::-webkit-scrollbar {
    width: 4px;
}

.drawer-devices-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

/* ==============================================================
   LIVE RUNTIME LOGS CONSOLE (Cupertino Dark Terminal Theme)
   ============================================================== */
.live-logs-card {
    width: 94%;
    max-width: 960px;
    height: 82vh;
    max-height: 720px;
    display: flex;
    flex-direction: column;
    background: #0d1117;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.8), 0 0 1px rgba(255, 255, 255, 0.2);
    overflow: hidden;
    animation: cupertinoModalPop 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.logs-badge {
    font-size: 11px;
    font-weight: 600;
    color: #34c759;
    background: rgba(52, 199, 89, 0.15);
    border: 1px solid rgba(52, 199, 89, 0.35);
    border-radius: 12px;
    padding: 2px 8px;
    margin-left: 6px;
    letter-spacing: 0.2px;
}

.logs-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.logs-filter-group {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 2px;
    gap: 2px;
}

.logs-filter-btn {
    background: transparent;
    border: none;
    color: #8b949e;
    font-size: 11px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.logs-filter-btn:hover {
    color: #f0f6fc;
    background: rgba(255, 255, 255, 0.08);
}

.logs-filter-btn.active {
    color: #ffffff;
    background: #0a84ff;
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(10, 132, 255, 0.35);
}

.logs-tools-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.logs-action-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #c9d1d9;
    font-size: 11px;
    font-weight: 500;
    padding: 5px 9px;
    border-radius: 7px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.15s ease;
}

.logs-action-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
}

.logs-action-btn.active {
    background: rgba(52, 199, 89, 0.16);
    border-color: rgba(52, 199, 89, 0.45);
    color: #34c759;
}

.live-logs-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: auto;
    padding: 12px 16px;
    background: #080a0f;
    font-family: "JetBrains Mono", "SF Mono", Menlo, Consolas, Monaco, "Courier New", monospace;
    font-size: 11.5px;
    line-height: 1.6;
    color: #c9d1d9;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.6);
}

.live-logs-body::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.live-logs-body::-webkit-scrollbar-track {
    background: #080a0f;
}

.live-logs-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.live-logs-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.35);
}

.live-logs-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    color: #8b949e;
    gap: 10px;
    font-size: 12px;
}

.live-logs-empty i {
    font-size: 1.8rem;
    color: #34c759;
}

.log-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 2.5px 6px;
    border-radius: 4px;
    word-break: break-word;
    white-space: pre-wrap;
    transition: background 0.1s ease;
}

.log-row:hover {
    background: rgba(255, 255, 255, 0.04);
}

.log-time {
    color: #6e7681;
    font-size: 11px;
    flex-shrink: 0;
    min-width: 62px;
    user-select: none;
}

.log-source {
    font-weight: 700;
    font-size: 11px;
    padding: 1px 5px;
    border-radius: 4px;
    flex-shrink: 0;
    letter-spacing: 0.3px;
    user-select: none;
}

.source-android {
    color: #34c759;
    background: rgba(52, 199, 89, 0.12);
    border: 1px solid rgba(52, 199, 89, 0.28);
}

.source-browser {
    color: #58a6ff;
    background: rgba(88, 166, 255, 0.12);
    border: 1px solid rgba(88, 166, 255, 0.28);
}

.source-server {
    color: #d2a8ff;
    background: rgba(210, 168, 255, 0.12);
    border: 1px solid rgba(210, 168, 255, 0.28);
}

.log-tag {
    color: #8b949e;
    font-weight: 600;
    flex-shrink: 0;
}

.log-msg {
    flex: 1;
    color: #f0f6fc;
}

.log-level-error .log-msg {
    color: #ff7b72;
    font-weight: 600;
}

.log-level-error {
    background: rgba(255, 123, 114, 0.08);
}

.log-level-warn .log-msg {
    color: #d29922;
}

.log-level-warn {
    background: rgba(210, 153, 34, 0.06);
}

.log-level-debug .log-msg {
    color: #8b949e;
}

.live-logs-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background: #0d1117;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 11px;
    color: #8b949e;
}

.logs-footer-left {
    display: flex;
    align-items: center;
    gap: 6px;
}

.logs-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
}

.logs-status-dot.online {
    background: #34c759;
    box-shadow: 0 0 6px rgba(52, 199, 89, 0.8);
}

.logs-status-dot.offline {
    background: #ff453a;
    box-shadow: 0 0 6px rgba(255, 69, 58, 0.8);
}

.logs-shortcut-hint {
    color: #6e7681;
    font-size: 10.5px;
}

@media (max-width: 640px) {
    .live-logs-card {
        width: 98%;
        height: 90vh;
    }
    .logs-header-actions {
        gap: 4px;
    }
    .logs-filter-btn {
        padding: 3px 6px;
        font-size: 10px;
    }
    .logs-action-btn .btn-text {
        display: none;
    }
}


/* ============================================================ */
/* PERMISSIONS GHOST ICON + SIDE SHEET — Android App Only       */
/* ============================================================ */

#perm-ghost-icon {
    transition: opacity 0.2s;
}
#perm-ghost-icon:active {
    opacity: 0.6 !important;
}

#perm-sheet {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.22) #1c1c1e;
}

#perm-sheet::-webkit-scrollbar {
    width: 6px;
}

#perm-sheet::-webkit-scrollbar-track {
    background: #1c1c1e;
}

#perm-sheet::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.22);
    border-radius: 999px;
}

#perm-sheet::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.38);
}

#perm-sheet.perm-sheet-open {
    transform: translateX(0);
}

.perm-section-label {
    font-size: 10px;
    color: #8ab4f8;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin: 12px 0 6px;
    padding-left: 2px;
}

.perm-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255,255,255,0.04);
    border-radius: 10px;
    padding: 10px 11px;
    margin-bottom: 6px;
    border: 1px solid rgba(255,255,255,0.05);
}

.perm-item-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.perm-item-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}

.perm-item-icon.granted {
    background: rgba(52,199,89,0.15);
    color: #34c759;
}

.perm-item-icon.denied {
    background: rgba(255,69,58,0.13);
    color: #ff453a;
}

.perm-item-name {
    font-size: 13px;
    color: #f2f2f7;
    font-weight: 500;
}

.perm-item-status {
    font-size: 10px;
    margin-top: 1px;
}

.perm-item-status.granted {
    color: #34c759;
}

.perm-item-status.denied {
    color: #ff453a;
}

.perm-grant-btn {
    background: rgba(138,180,248,0.15);
    border: 1px solid rgba(138,180,248,0.25);
    border-radius: 7px;
    color: #8ab4f8;
    font-size: 10px;
    padding: 5px 9px;
    cursor: pointer;
    white-space: nowrap;
    font-weight: 500;
    transition: background 0.15s;
}

.perm-grant-btn:active {
    background: rgba(138,180,248,0.28);
}

/* Floating Android Remote Navigation Bar */
.remote-control-nav-bar {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: rgba(18, 19, 22, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 28px;
    padding: 6px 14px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.55);
    z-index: 45;
    pointer-events: auto;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.remote-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    color: #f2f2f7;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    cursor: pointer;
    transition: all 0.18s ease;
}

.remote-nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.remote-nav-btn:active {
    transform: scale(0.95);
    background: rgba(10, 132, 255, 0.45);
}
