/* ==============================================================================
   Google Meet Theme & Modern WebRTC Voice Client Styles
   Color Palette:
   - Stage background: #202124 (Google Meet Charcoal)
   - Tile surface:     #282a2d / #303134
   - Tile border:      rgba(255, 255, 255, 0.08)
   - Primary blue:     #8ab4f8 / #1a73e8
   - Meet green:       #81c995 / #34a853 (Speaking ring & indicators)
   - Meet red:         #ea4335 (Hangup & Muted buttons)
   - Text high:        #e8eaed
   - Text muted:       #9aa0a6
   ============================================================================== */

:root {
    color-scheme: dark;
    --meet-bg: #12141c;
    --meet-surface: #1b1e2b;
    --meet-surface-hover: #25293a;
    --meet-tile-bg: #1d202e;
    --meet-tile-border: rgba(255, 255, 255, 0.09);
    --meet-blue: #8ab4f8;
    --meet-blue-dark: #5865f2;
    --meet-green: #23a55a;
    --meet-green-glow: rgba(35, 165, 90, 0.42);
    --meet-amber: #facc15;
    --meet-red: #ea4335;
    --meet-red-hover: #d93025;
    --meet-gray-btn: #2b2f40;
    --meet-gray-btn-hover: #383d52;
    --meet-text: #e8eaed;
    --meet-text-muted: #9aa0a6;
    --radius-tile: 18px;
    --radius-dock: 9999px;
    --dock-height: 80px;
    --header-height: 64px;

    /* Alo (الو) Discord + Gaming Lobby Tokens */
    --alo-bg: #0d0f17;
    --alo-surface: #151824;
    --alo-surface-elevated: #1c2030;
    --alo-input-bg: #0e1018;
    --alo-blurple: #5865f2;
    --alo-blurple-hover: #4752c4;
    --alo-cyan: #00d2ff;
    --alo-online: #23a55a;
    --alo-border: rgba(255, 255, 255, 0.08);
    --alo-border-glow: rgba(88, 101, 242, 0.35);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* Sleek dark custom scrollbars across all panels & sidebars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.24);
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(138, 180, 248, 0.5);
}

::-webkit-scrollbar-corner {
    background: transparent;
}

@supports not selector(::-webkit-scrollbar) {
    * {
        scrollbar-width: thin;
        scrollbar-color: rgba(138, 180, 248, 0.35) transparent;
    }
}

body.meet-app {
    background-color: var(--alo-bg);
    background-image:
        radial-gradient(60% 45% at 12% 0%, rgba(88, 101, 242, 0.16) 0%, transparent 70%),
        radial-gradient(50% 40% at 88% 10%, rgba(0, 210, 255, 0.10) 0%, transparent 70%);
    color: var(--meet-text);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    user-select: none;
}

/* Smooth GPU-composited entry & speaking keyframes (Android-friendly: transform & opacity only) */
@keyframes aloFadeUp {
    from {
        opacity: 0;
        transform: translate3d(0, 12px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==============================================================================
   1. LOBBY / PRE-JOIN SCREEN (Alo الو Discord + Gaming Lobby)
   ============================================================================== */

.meet-lobby-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 20px 32px 32px;
    max-width: 1280px;
    margin: 0 auto;
    width: 100%;
    position: relative;
}

.meet-lobby-container::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(88, 101, 242, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(88, 101, 242, 0.035) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 20%, rgba(0, 0, 0, 0.85), transparent 95%);
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 20%, rgba(0, 0, 0, 0.85), transparent 95%);
    pointer-events: none;
    z-index: 0;
}

.lobby-header,
.lobby-main {
    position: relative;
    z-index: 1;
}

.lobby-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 12px 18px;
    background: rgba(21, 24, 36, 0.92);
    border: 1px solid rgba(88, 101, 242, 0.24);
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
    animation: aloFadeUp 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.lobby-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.meet-logo-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.24), rgba(0, 210, 255, 0.16));
    border: 1px solid rgba(88, 101, 242, 0.42);
    box-shadow: 0 4px 16px rgba(88, 101, 242, 0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.brand-text h1 {
    font-size: 1.32rem;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 7px;
    letter-spacing: -0.2px;
}

.alo-brand-title {
    font-size: 1.45rem;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 0 2px 12px rgba(88, 101, 242, 0.45);
}

.brand-sub {
    background: linear-gradient(135deg, #818cf8, #00d2ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.brand-badge {
    background: rgba(88, 101, 242, 0.18);
    border: 1px solid rgba(88, 101, 242, 0.38);
    color: #a5b4fc;
    font-size: 0.72rem;
    padding: 3px 9px;
    border-radius: 8px;
    font-weight: 700;
}

.lobby-top-status {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.lobby-new-features-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.16), rgba(0, 210, 255, 0.12));
    border: 1px solid rgba(88, 101, 242, 0.35);
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #e2e8f0;
}

.alo-svg-icon {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

.alo-ico-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pill-sparkle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--alo-cyan);
    animation: pulseSparkle 2.4s infinite ease-in-out;
    will-change: transform, opacity;
}

@keyframes pulseSparkle {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.16); opacity: 0.78; }
}

.status-indicator-pill, .ping-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 13px;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-install-pwa {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.26), rgba(0, 210, 255, 0.18));
    border: 1px solid rgba(129, 140, 248, 0.48);
    color: #f8fafc;
    padding: 6px 14px;
    border-radius: 9999px;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(88, 101, 242, 0.24);
    transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.2s ease, background 0.2s ease;
}

.btn-install-pwa svg {
    color: #7dd3fc;
    flex-shrink: 0;
}

.btn-install-pwa:hover {
    transform: translateY(-1px);
    border-color: rgba(0, 210, 255, 0.68);
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.38), rgba(0, 210, 255, 0.28));
}

.btn-install-pwa:active {
    transform: scale(0.96);
}

.offline-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(245, 158, 11, 0.16);
    border: 1px solid rgba(250, 204, 21, 0.42);
    color: #fde68a;
    padding: 6px 12px;
    border-radius: 9999px;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.pwa-install-modal-card {
    max-width: 460px;
    width: 92vw;
}

.pwa-modal-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pwa-modal-badge-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.26), rgba(0, 210, 255, 0.18));
    border: 1px solid rgba(129, 140, 248, 0.42);
    color: #7dd3fc;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pwa-guide-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pwa-guide-lead {
    font-size: 0.86rem;
    color: #cbd5e1;
    line-height: 1.65;
}

.pwa-guide-steps {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pwa-guide-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(21, 24, 36, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.pwa-step-num {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: rgba(88, 101, 242, 0.2);
    border: 1px solid rgba(88, 101, 242, 0.38);
    color: #a5b4fc;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.pwa-step-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.pwa-step-text strong {
    font-size: 0.86rem;
    color: #f8fafc;
}

.pwa-step-text span {
    font-size: 0.78rem;
    color: var(--meet-text-muted);
    line-height: 1.55;
}

.pwa-guide-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 4px;
}

#callPingVal,
#lobbyPingVal {
    direction: ltr;
    unicode-bidi: isolate;
    display: inline-block;
    font-variant-numeric: tabular-nums;
}

.status-dot, .signal-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #eab308;
    flex-shrink: 0;
}

.status-dot.online, .signal-dot {
    background: var(--alo-online);
    box-shadow: 0 0 8px rgba(35, 165, 90, 0.65);
}

/* Dual Card Split */
.lobby-main {
    display: grid;
    grid-template-columns: 0.94fr 1.06fr;
    gap: 32px;
    margin-top: 24px;
    align-items: start;
    flex: 1;
}

/* Left: Discord-Style Profile & Voice Card */
.preview-tile-card {
    background: var(--alo-surface);
    border-radius: 22px;
    border: 1px solid rgba(88, 101, 242, 0.24);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.48);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: aloFadeUp 0.34s cubic-bezier(0.22, 1, 0.36, 1) 0.04s both;
}

.preview-viewport {
    position: relative;
    min-height: 360px;
    padding: 46px 20px 22px;
    background: linear-gradient(180deg, #1b2033 0%, var(--alo-surface) 78%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    overflow: hidden;
}

.preview-avatar-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    z-index: 2;
}

.preview-avatar-wrap {
    position: relative;
    width: 112px;
    height: 112px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-avatar-box {
    width: 112px;
    height: 112px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--alo-blurple), var(--alo-cyan));
    border: 5px solid var(--alo-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.48);
    overflow: hidden;
    z-index: 2;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.preview-avatar-box:hover {
    transform: scale(1.04);
}

.avatar-online-dot {
    position: absolute;
    bottom: 4px;
    left: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--alo-online);
    border: 4px solid var(--alo-surface);
    z-index: 4;
    pointer-events: none;
}

.preview-avatar-mute-badge {
    position: absolute;
    bottom: 2px;
    left: 2px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--meet-red, #ed4245);
    color: #fff;
    border: 3px solid var(--alo-surface, #151824);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 5;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(237, 66, 69, 0.45);
}

.preview-avatar-wrap.is-muted .avatar-online-dot {
    display: none;
}

.preview-avatar-wrap.is-muted .preview-avatar-mute-badge {
    display: flex;
}

.preview-avatar-wrap.is-muted .preview-avatar-box {
    border-color: rgba(237, 66, 69, 0.72);
}

.avatar-letter {
    font-size: 2.7rem;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Hover Overlay for Immediate Avatar Upload */
.avatar-hover-overlay {
    position: absolute;
    inset: 0;
    background: rgba(13, 15, 23, 0.68);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #fff;
    font-size: 0.74rem;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.18s ease;
    border-radius: 50%;
}

.preview-avatar-box:hover .avatar-hover-overlay,
.clickable-avatar:hover .avatar-hover-overlay {
    opacity: 1;
}

/* GPU-only Speaking Glow Ring (animates transform & opacity only) */
.preview-speaking-ring, .speaking-ring {
    position: absolute;
    width: 112px;
    height: 112px;
    border-radius: 50%;
    pointer-events: none;
    transition: opacity 0.18s ease;
    z-index: 1;
    will-change: transform, opacity;
}

.speaking .preview-speaking-ring,
.speaking .speaking-ring,
.preview-speaking-active {
    box-shadow: 0 0 0 5px var(--alo-online), 0 0 24px var(--meet-green-glow);
    animation: meetSpeakingPulse 1.35s infinite alternate ease-in-out;
}

@keyframes meetSpeakingPulse {
    0% { transform: scale(1); opacity: 0.78; }
    100% { transform: scale(1.07); opacity: 1; }
}

/* Discord-Style Profile Banner Strip in Preview Viewport (Default Cyber Gradient + Custom PNG/GIF) */
.preview-banner-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 122px;
    background-image: linear-gradient(135deg, #2e1065 0%, #5865f2 54%, #0284c7 100%);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.9;
    transition: opacity 0.25s ease;
    z-index: 1;
    pointer-events: none;
}

.preview-banner-backdrop::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(13, 15, 23, 0.05) 35%, var(--alo-surface) 100%);
}

.preview-banner-backdrop.has-banner {
    height: 148px;
    opacity: 0.96;
}

.preview-banner-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(13, 15, 23, 0.78);
    border: 1px solid rgba(35, 165, 90, 0.55);
    color: #4ade80;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 9999px;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.preview-identity-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    width: 100%;
}

.preview-user-tag {
    color: #fff;
    font-size: 1.06rem;
    font-weight: 800;
    letter-spacing: -0.15px;
    text-align: center;
    max-width: 90%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.preview-identity-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.preview-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(35, 165, 90, 0.14);
    border: 1px solid rgba(35, 165, 90, 0.34);
    color: #4ade80;
    font-size: 0.74rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 9999px;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.online-pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--alo-online);
    display: inline-block;
}

.preview-status-pill.is-no-mic,
.preview-status-pill.is-muted {
    background: rgba(237, 66, 69, 0.14);
    border-color: rgba(237, 66, 69, 0.35);
    color: #fda4af;
}

.preview-status-pill.is-no-mic .online-pulse-dot,
.preview-status-pill.is-muted .online-pulse-dot {
    background: var(--meet-red, #ed4245);
    box-shadow: 0 0 8px rgba(237, 66, 69, 0.65);
}

/* Upload Avatar Action Buttons in Lobby */
.avatar-actions-row {
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    z-index: 3;
    width: 100%;
}

.btn-avatar-upload {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--alo-blurple);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 14px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(88, 101, 242, 0.35);
    transition: transform 0.16s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.16s ease;
}

.btn-avatar-upload:hover {
    background: var(--alo-blurple-hover);
    transform: translateY(-1px);
}

.btn-avatar-upload:active {
    transform: scale(0.97);
}

.btn-avatar-upload svg,
.btn-avatar-presets svg {
    flex-shrink: 0;
}

.btn-avatar-upload.btn-banner-action {
    background: linear-gradient(135deg, #7c3aed, #5865f2);
    color: #fff;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35);
}

.btn-avatar-upload.btn-banner-action:hover {
    background: linear-gradient(135deg, #6d28d9, #4752c4);
    color: #fff;
}

.btn-avatar-presets {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--alo-surface-elevated);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 13px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.16s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.16s ease;
}

.btn-avatar-presets:hover {
    background: #272c42;
    color: #fff;
    transform: translateY(-1px);
}

.preview-mic-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--alo-input-bg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 5px 11px;
    border-radius: 9999px;
}

.mic-wave-icon {
    color: var(--alo-online);
    display: flex;
    align-items: center;
}

.mic-wave-icon.muted {
    color: var(--meet-red);
}

.preview-meter-track {
    width: 68px;
    height: 6px;
    background: rgba(255, 255, 255, 0.14);
    border-radius: 4px;
    overflow: hidden;
}

.preview-meter-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--alo-online), var(--alo-cyan));
    transition: width 0.08s ease-out;
}

.preview-quick-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 16px;
    background: #10121c;
    border-top: 1px solid var(--alo-border);
}

.action-circle-btn {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--alo-surface-elevated);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.16s ease, background-color 0.16s ease;
}

.action-circle-btn:hover {
    background: #2b314a;
    transform: translateY(-1px);
}

.action-circle-btn.btn-active-muted {
    background: var(--meet-red);
    border-color: rgba(255, 255, 255, 0.15);
}

.btn-text-pill {
    background: var(--alo-surface-elevated);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    padding: 9px 18px;
    border-radius: 14px;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}

#lobbyTestMicText {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.btn-text-pill:hover, .btn-text-pill.active {
    background: rgba(88, 101, 242, 0.2);
    color: #a5b4fc;
    border-color: var(--alo-blurple);
}

/* Right: Join Form Card */
.lobby-join-card {
    display: flex;
    flex-direction: column;
    animation: aloFadeUp 0.36s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
}

.join-card-header h2 {
    font-size: 1.82rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.35;
    margin-bottom: 8px;
}

.hero-accent {
    background: linear-gradient(135deg, #818cf8 0%, #00d2ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.join-card-sub {
    color: #94a3b8;
    font-size: 0.92rem;
    margin-bottom: 18px;
    line-height: 1.65;
}

.lobby-features-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

.feat-badge-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(21, 24, 36, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 8px 12px;
    font-size: 0.79rem;
    font-weight: 600;
    color: #cbd5e1;
    transition: border-color 0.18s ease, background-color 0.18s ease;
}

.feat-badge-item:hover {
    background: var(--alo-surface-elevated);
    border-color: rgba(88, 101, 242, 0.42);
}

.feat-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(88, 101, 242, 0.16);
    color: #a5b4fc;
}

.feat-icon-purple { background: rgba(192, 132, 252, 0.16); color: #c084fc; }
.feat-icon-cyan   { background: rgba(56, 189, 248, 0.16); color: #38bdf8; }
.feat-icon-indigo { background: rgba(129, 140, 248, 0.18); color: #818cf8; }
.feat-icon-green  { background: rgba(74, 222, 128, 0.16); color: #4ade80; }
.feat-icon-amber  { background: rgba(251, 191, 36, 0.16); color: #fbbf24; }
.feat-icon-pink   { background: rgba(244, 114, 182, 0.16); color: #f472b6; }

.lobby-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.input-group-meet {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-group-meet label {
    font-size: 0.85rem;
    color: #94a3b8;
    font-weight: 600;
}

.input-with-icon {
    display: flex;
    align-items: center;
    gap: 11px;
    background: var(--alo-input-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 11px 14px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.input-with-icon:focus-within {
    border-color: var(--alo-blurple);
    box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.22);
    background: #121521;
}

.input-with-icon svg {
    color: #818cf8;
    flex-shrink: 0;
}

.input-with-icon input {
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 0.94rem;
    width: 100%;
    min-width: 0;
}

.input-with-icon input::placeholder {
    color: rgba(255, 255, 255, 0.34);
}

/* Weak Mic Banner */
.weak-mic-badge-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(234, 179, 8, 0.08);
    border: 1px solid rgba(234, 179, 8, 0.26);
    border-radius: 14px;
    padding: 11px 14px;
    margin: 4px 0;
}

.banner-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(250, 204, 21, 0.16);
    border: 1px solid rgba(250, 204, 21, 0.35);
    color: #facc15;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.banner-text {
    display: flex;
    flex-direction: column;
    font-size: 0.8rem;
    flex: 1;
    min-width: 0;
}

.banner-text strong {
    color: #facc15;
    margin-bottom: 2px;
}

.banner-text span {
    color: #94a3b8;
    line-height: 1.45;
}

.btn-banner-action {
    background: #facc15;
    color: #1c1917;
    border: none;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 7px 14px;
    border-radius: 10px;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.15s ease, background-color 0.15s ease;
}

.btn-banner-action:hover {
    background: #fde047;
    transform: scale(1.03);
}

/* Primary Gaming Join Button */
.btn-meet-join {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #5865f2 0%, #4752c4 58%, #3b82f6 100%);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 16px;
    padding: 14px 26px;
    font-size: 1.03rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(88, 101, 242, 0.42);
    transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), filter 0.18s ease;
    margin-top: 6px;
}

.btn-meet-join:hover {
    filter: brightness(1.08);
    transform: translateY(-2px);
}

.btn-meet-join:active {
    transform: scale(0.98);
}

@media (max-width: 1024px) {
    .meet-lobby-container {
        padding: 16px 20px 28px;
    }

    .lobby-header {
        flex-wrap: wrap;
        gap: 10px;
    }

    .lobby-top-status {
        justify-content: flex-start;
    }

    .lobby-main {
        grid-template-columns: 1fr;
        gap: 24px;
        max-width: 680px;
        width: 100%;
        margin: 20px auto 0;
    }
}

.spin-icon {
    animation: spinRotate 0.8s linear infinite;
    flex-shrink: 0;
}

@keyframes spinRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}


/* ==============================================================================
   2. IN-CALL GOOGLE MEET DARK CONFERENCE STAGE
   ============================================================================== */

.meet-call-stage {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    background: var(--meet-bg);
    position: relative;
    overflow: hidden;
}

/* ==============================================================================
   ROOM BACKGROUND STARRY NIGHT BACKDROP (ستاره‌های سفید پس‌زمینه روم)
   ============================================================================== */
.room-stars-backdrop {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
    background-image: 
        radial-gradient(1.5px 1.5px at 12% 18%, rgba(255, 255, 255, 0.85) 50%, transparent 100%),
        radial-gradient(1px 1px at 28% 12%, rgba(255, 255, 255, 0.65) 50%, transparent 100%),
        radial-gradient(2px 2px at 45% 22%, rgba(255, 255, 255, 0.9) 50%, transparent 100%),
        radial-gradient(1.2px 1.2px at 68% 14%, rgba(255, 255, 255, 0.75) 50%, transparent 100%),
        radial-gradient(1.8px 1.8px at 88% 24%, rgba(255, 255, 255, 0.8) 50%, transparent 100%),
        radial-gradient(1px 1px at 8% 48%, rgba(255, 255, 255, 0.6) 50%, transparent 100%),
        radial-gradient(2px 2px at 22% 62%, rgba(255, 255, 255, 0.85) 50%, transparent 100%),
        radial-gradient(1.2px 1.2px at 38% 78%, rgba(255, 255, 255, 0.7) 50%, transparent 100%),
        radial-gradient(1.6px 1.6px at 62% 68%, rgba(255, 255, 255, 0.8) 50%, transparent 100%),
        radial-gradient(1px 1px at 78% 54%, rgba(255, 255, 255, 0.65) 50%, transparent 100%),
        radial-gradient(2px 2px at 92% 72%, rgba(255, 255, 255, 0.9) 50%, transparent 100%),
        radial-gradient(1.4px 1.4px at 50% 90%, rgba(255, 255, 255, 0.75) 50%, transparent 100%),
        radial-gradient(1px 1px at 16% 88%, rgba(255, 255, 255, 0.6) 50%, transparent 100%),
        radial-gradient(1.5px 1.5px at 84% 92%, rgba(255, 255, 255, 0.7) 50%, transparent 100%);
    opacity: 0.85;
    animation: starsAmbientShift 14s ease-in-out infinite alternate;
}

/* Individual Tiny White Stars */
.room-stars-backdrop .star {
    position: absolute;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 6px 1.5px rgba(255, 255, 255, 0.85), 0 0 12px 2px rgba(255, 255, 255, 0.4);
    pointer-events: none;
}

/* Coordinates & Individual Twinkle Timings */
.room-stars-backdrop .star-1  { top: 14%; left: 18%; width: 2.5px; height: 2.5px; animation: starTwinkle 3.2s infinite ease-in-out; }
.room-stars-backdrop .star-2  { top: 24%; left: 34%; width: 2px;   height: 2px;   animation: starTwinkle 4.5s infinite ease-in-out 0.8s; }
.room-stars-backdrop .star-3  { top: 12%; left: 62%; width: 3px;   height: 3px;   animation: starTwinkle 2.8s infinite ease-in-out 1.2s; }
.room-stars-backdrop .star-4  { top: 28%; left: 82%; width: 2px;   height: 2px;   animation: starTwinkle 3.9s infinite ease-in-out 0.4s; }
.room-stars-backdrop .star-5  { top: 42%; left: 10%; width: 2.5px; height: 2.5px; animation: starTwinkle 4.2s infinite ease-in-out 1.6s; }
.room-stars-backdrop .star-6  { top: 56%; left: 22%; width: 3px;   height: 3px;   animation: starTwinkle 3.5s infinite ease-in-out 2.1s; }
.room-stars-backdrop .star-7  { top: 74%; left: 38%; width: 2px;   height: 2px;   animation: starTwinkle 4.8s infinite ease-in-out 0.7s; }
.room-stars-backdrop .star-8  { top: 62%; left: 72%; width: 2.5px; height: 2.5px; animation: starTwinkle 3.1s infinite ease-in-out 1.9s; }
.room-stars-backdrop .star-9  { top: 82%; left: 86%; width: 2px;   height: 2px;   animation: starTwinkle 4.0s infinite ease-in-out 1.1s; }
.room-stars-backdrop .star-10 { top: 38%; left: 91%; width: 2.5px; height: 2.5px; animation: starTwinkle 3.6s infinite ease-in-out 2.5s; }
.room-stars-backdrop .star-11 { top: 80%; left: 15%; width: 2px;   height: 2px;   animation: starTwinkle 4.4s infinite ease-in-out 1.4s; }
.room-stars-backdrop .star-12 { top: 88%; left: 56%; width: 2.5px; height: 2.5px; animation: starTwinkle 3.7s infinite ease-in-out 0.5s; }
.room-stars-backdrop .star-13 { top: 20%; left: 50%; width: 2px;   height: 2px;   animation: starTwinkle 4.1s infinite ease-in-out 1.8s; }
.room-stars-backdrop .star-14 { top: 48%; left: 46%; width: 1.5px; height: 1.5px; animation: starTwinkle 3.3s infinite ease-in-out 0.9s; }
.room-stars-backdrop .star-15 { top: 68%; left: 90%; width: 2.5px; height: 2.5px; animation: starTwinkle 4.6s infinite ease-in-out 2.2s; }
.room-stars-backdrop .star-16 { top: 32%; left: 6%;  width: 2px;   height: 2px;   animation: starTwinkle 3.8s infinite ease-in-out 0.3s; }

/* Micro Sparkle Stars (✦) */
.room-stars-backdrop .star-sparkle {
    position: absolute;
    background: transparent;
    box-shadow: none;
    color: #ffffff;
    font-size: 11px;
    line-height: 1;
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.9), 0 0 14px rgba(255, 255, 255, 0.6);
    user-select: none;
    pointer-events: none;
}

.room-stars-backdrop .star-s1 { top: 16%; left: 78%; animation: sparklePulse 4.2s infinite ease-in-out 0.5s; font-size: 13px; }
.room-stars-backdrop .star-s2 { top: 66%; left: 12%; animation: sparklePulse 5.0s infinite ease-in-out 2.0s; font-size: 12px; }
.room-stars-backdrop .star-s3 { top: 25%; left: 24%; animation: sparklePulse 3.8s infinite ease-in-out 1.2s; font-size: 10px; }
.room-stars-backdrop .star-s4 { top: 76%; left: 68%; animation: sparklePulse 4.6s infinite ease-in-out 2.8s; font-size: 11px; }
.room-stars-backdrop .star-s5 { top: 45%; left: 84%; animation: sparklePulse 4.0s infinite ease-in-out 1.7s; font-size: 10px; }

@keyframes starTwinkle {
    0%, 100% {
        opacity: 0.25;
        transform: scale(0.85);
    }
    50% {
        opacity: 1;
        transform: scale(1.4);
    }
}

@keyframes sparklePulse {
    0%, 100% {
        opacity: 0.2;
        transform: scale(0.7) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.25) rotate(15deg);
    }
}

@keyframes starsAmbientShift {
    0% {
        opacity: 0.7;
    }
    100% {
        opacity: 0.95;
    }
}

/* Minimal Top Bar */
.meet-top-bar {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(32, 33, 36, 0.85);
    backdrop-filter: blur(12px);
    z-index: 10;
}

.top-left-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.meet-room-code {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
}

.meet-divider {
    color: rgba(255, 255, 255, 0.2);
}

.btn-top-copy {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    color: var(--meet-blue);
    border: none;
    font-size: 0.84rem;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
}

.btn-top-copy:hover {
    background: rgba(138, 180, 248, 0.12);
}

.top-center-clock {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--meet-text-muted);
}

.top-right-badges {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-top-panel-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--meet-gray-btn);
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-top-panel-toggle:hover {
    background: var(--meet-gray-btn-hover);
}

.btn-top-panel-toggle.btn-top-active {
    background: rgba(138, 180, 248, 0.25);
    color: var(--meet-blue);
    border: 1px solid rgba(138, 180, 248, 0.4);
}

.btn-top-mobile-only {
    display: none;
}

.count-pill-badge {
    background: var(--meet-blue);
    color: #1a1c1e;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 9999px;
}

/* Stage Body & Sidebar Layout */
.meet-stage-body {
    flex: 1;
    min-height: 0;
    display: flex;
    position: relative;
    z-index: 2;
    overflow: hidden;
    padding-bottom: calc(var(--dock-height) + 22px + env(safe-area-inset-bottom, 0px));
}

.meet-grid-wrapper {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    padding: 20px 28px 34px;
    scroll-padding-bottom: 34px;
    overflow-y: auto;
    overflow-x: hidden;
    width: 100%;
    box-sizing: border-box;
}

/* Google Meet Adaptive Responsive Grid */
.meet-grid {
    display: grid;
    gap: 20px;
    width: 100%;
    max-width: 1500px;
    min-height: min-content;
    height: auto;
    align-content: center;
    justify-content: center;
    margin: auto;
    padding-bottom: 8px;
}

/* Compact-Height Desktop & Laptop Viewports (prevents 2-row grids from clipping near bottom dock) */
@media (max-height: 820px) and (min-width: 769px) {
    .meet-stage-body:not(.has-presentation) .meet-grid-wrapper {
        padding: 14px 24px 28px;
    }

    .meet-stage-body:not(.has-presentation) .meet-grid {
        gap: 16px;
    }

    .meet-stage-body:not(.has-presentation) .meet-grid[data-count="3"] .meet-tile,
    .meet-stage-body:not(.has-presentation) .meet-grid[data-count="4"] .meet-tile,
    .meet-stage-body:not(.has-presentation) .meet-grid[data-count="5"] .meet-tile,
    .meet-stage-body:not(.has-presentation) .meet-grid[data-count="6"] .meet-tile {
        aspect-ratio: auto;
        min-height: 164px;
        height: calc((100dvh - var(--header-height) - var(--dock-height) - 96px) / 2);
        max-height: 280px;
    }
}

/* Dynamic Grid Configurations */
.meet-grid[data-count="1"] {
    grid-template-columns: 1fr;
    max-width: 880px;
    max-height: calc(100vh - 180px);
}

.meet-grid[data-count="2"] {
    grid-template-columns: repeat(2, 1fr);
    max-width: 1300px;
}

.meet-grid[data-count="3"],
.meet-grid[data-count="4"] {
    grid-template-columns: repeat(2, 1fr);
    max-width: 1300px;
}

.meet-grid[data-count="5"],
.meet-grid[data-count="6"] {
    grid-template-columns: repeat(3, 1fr);
    max-width: 1400px;
}

.meet-grid[data-count="7"],
.meet-grid[data-count="8"],
.meet-grid[data-count="9"] {
    grid-template-columns: repeat(3, 1fr);
    max-width: 1400px;
}

/* Participant Tile */
.meet-tile {
    position: relative;
    background: var(--meet-tile-bg);
    border-radius: var(--radius-tile);
    border: 1px solid var(--meet-tile-border);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
    aspect-ratio: 16 / 9;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.meet-tile.speaking {
    border-color: var(--meet-green);
    box-shadow: 0 0 0 3px var(--meet-green), 0 0 24px var(--meet-green-glow);
}

/* Tile Profile Banner Backdrop (Supports PNG, JPG & Animated GIF) */
.tile-banner-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 52%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.35s ease, height 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 1;
    border-radius: var(--radius-tile) var(--radius-tile) 0 0;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 40%, rgba(0,0,0,0) 100%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 40%, rgba(0,0,0,0) 100%);
    pointer-events: none;
}

.tile-banner-backdrop.has-banner {
    opacity: 0.88;
}

.meet-tile:hover .tile-banner-backdrop.has-banner {
    opacity: 1;
    height: 60%;
}

.tile-avatar-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tile-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a73e8, #8ab4f8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    z-index: 2;
    position: relative;
}

.tile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.meet-tile.speaking .tile-avatar-wrap .speaking-ring {
    box-shadow: 0 0 0 5px var(--meet-green), 0 0 28px var(--meet-green-glow);
    animation: meetSpeakingPulse 1.4s infinite alternate ease-in-out;
}

/* Self-Avatar Camera Badge */
.self-tile .tile-avatar {
    cursor: pointer;
}

.tile-avatar-change-hint {
    position: absolute;
    bottom: -6px;
    background: rgba(88, 101, 242, 0.95);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 9999px;
    z-index: 3;
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.tile-avatar-status-badges {
    position: absolute;
    bottom: 0;
    left: -4px;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 5;
    pointer-events: none;
}

.tile-avatar-mute-overlay,
.tile-avatar-deafen-overlay {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--meet-red, #ed4245);
    color: #fff;
    border: 3px solid #151824;
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    box-shadow: 0 3px 10px rgba(237, 66, 69, 0.5);
    flex-shrink: 0;
}

.tile-avatar-deafen-overlay {
    background: linear-gradient(135deg, #f43f5e, #e11d48);
    box-shadow: 0 3px 12px rgba(244, 63, 94, 0.55);
}

.meet-tile.is-muted .tile-avatar-mute-overlay {
    display: flex;
}

.meet-tile.is-deafened .tile-avatar-deafen-overlay {
    display: flex;
    animation: aloDeafenPopIn 0.36s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
               aloDeafenPulse 2.1s 0.38s infinite ease-in-out;
}

.meet-tile.is-muted .tile-avatar {
    box-shadow: 0 0 0 3px rgba(237, 66, 69, 0.75), 0 6px 18px rgba(0, 0, 0, 0.35);
}

.self-tile.is-muted .tile-avatar-change-hint,
.self-tile.is-deafened .tile-avatar-change-hint {
    bottom: -12px;
}

/* Top Bar inside each Tile */
.tile-top-row {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 4;
}

.tile-status-badges {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tile-mic-badge,
.tile-deafen-badge {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--meet-green);
    flex-shrink: 0;
    transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.tile-mic-badge.muted {
    background: var(--meet-red);
    color: #fff;
}

.tile-deafen-badge {
    display: none;
    background: linear-gradient(135deg, #f43f5e, #dc2626);
    color: #fff;
    box-shadow: 0 0 0 2px rgba(244, 63, 94, 0.35), 0 4px 12px rgba(225, 29, 72, 0.45);
}

.tile-deafen-badge.is-deafened {
    display: flex;
    animation: aloDeafenPopIn 0.36s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
               aloDeafenPulse 2.1s 0.38s infinite ease-in-out;
}

.tile-deafen-badge.is-deafened svg,
.tile-avatar-deafen-overlay svg {
    animation: aloDeafenIconShake 0.45s 0.08s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

.dock-btn#dockDeafenBtn.dock-btn-muted {
    animation: aloDeafenPopIn 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.participant-row-status.deafened {
    color: #fda4af;
}

.sidebar-status-deafen-pill {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-right: 6px;
    padding: 1px 7px;
    border-radius: 9999px;
    background: rgba(244, 63, 94, 0.16);
    border: 1px solid rgba(251, 113, 133, 0.35);
    color: #fda4af;
    font-size: 0.7rem;
    font-weight: 600;
    animation: aloDeafenPopIn 0.3s ease-out;
}

@keyframes aloDeafenPopIn {
    0% {
        opacity: 0;
        transform: scale(0.35) rotate(-14deg);
    }
    65% {
        opacity: 1;
        transform: scale(1.16) rotate(4deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

@keyframes aloDeafenIconShake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-12deg); }
    55% { transform: rotate(10deg); }
    80% { transform: rotate(-5deg); }
}

@keyframes aloDeafenPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 2px rgba(244, 63, 94, 0.35), 0 4px 12px rgba(225, 29, 72, 0.45);
    }
    50% {
        transform: scale(1.08);
        box-shadow: 0 0 0 5px rgba(244, 63, 94, 0.12), 0 6px 16px rgba(225, 29, 72, 0.65);
    }
}

/* Remote Peer Volume Toolbar (Always easily accessible) */
.tile-peer-controls-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(24, 25, 28, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 4px 8px;
    border-radius: 9999px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.tile-peer-mute-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.tile-peer-mute-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.tile-peer-mute-btn.is-muted {
    background: var(--meet-red);
    color: #fff;
}

.tile-vol-stepper-btn {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
}

.tile-vol-stepper-btn:hover {
    background: var(--meet-blue);
    color: #1a1c1e;
}

.tile-vol-range-input {
    width: 70px;
    height: 5px;
    accent-color: var(--meet-blue);
    cursor: pointer;
}

.tile-vol-text-badge {
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--meet-blue);
    min-width: 36px;
    text-align: center;
}

.tile-vol-text-badge.boosted {
    color: #34d399;
}

/* Tile Bottom-Left Name Pill */
.tile-name-pill {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 0.84rem;
    padding: 5px 12px;
    border-radius: 8px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 3;
}

.tile-self-tag {
    color: var(--meet-blue);
    font-size: 0.76rem;
    font-weight: 700;
}

/* Local Muted Warning Badge on Tile */
.tile-local-muted-alert {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(234, 67, 53, 0.88);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    display: none;
    align-items: center;
    gap: 5px;
    z-index: 3;
}


/* ==============================================================================
   3. GOOGLE MEET SLIDE-IN SIDEBAR ("People" Panel)
   ============================================================================== */

.meet-sidebar {
    width: 360px;
    background: var(--meet-surface);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    height: 100%;
    z-index: 9;
    animation: slideInRight 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInRight {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-title h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: #fff;
}

.sidebar-count {
    color: var(--meet-text-muted);
    font-size: 0.9rem;
}

.btn-sidebar-close {
    background: transparent;
    border: none;
    color: var(--meet-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 4px;
    border-radius: 50%;
}

.btn-sidebar-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-master-volume {
    padding: 14px 20px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.volume-header-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.84rem;
    color: var(--meet-text-muted);
}

.vol-percent {
    margin-right: auto;
    color: var(--meet-blue);
    font-weight: 700;
}

.volume-slider-with-btns {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-vol-step {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-vol-step:hover {
    background: var(--meet-blue);
    color: #1a1c1e;
}

.sidebar-hint-bar {
    padding: 8px 16px;
    background: rgba(138, 180, 248, 0.06);
    font-size: 0.76rem;
    color: var(--meet-text-muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: flex-start;
    gap: 7px;
    line-height: 1.45;
}

.sidebar-participants-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.participant-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(255, 255, 255, 0.03);
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.2s;
}

.participant-row:hover {
    background: rgba(255, 255, 255, 0.06);
}

.participant-row-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.participant-mini-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a73e8, #8ab4f8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
    overflow: hidden;
    flex-shrink: 0;
}

.participant-mini-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.participant-row-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.participant-row-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 6px;
}

.participant-row-role {
    font-size: 0.74rem;
    color: var(--meet-blue);
    font-weight: 700;
}

.participant-row-status {
    font-size: 0.76rem;
    color: var(--meet-green);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.participant-row-status.muted {
    color: var(--meet-red);
}

/* Sidebar Participant Volume Slider & Mute Row */
.participant-row-volume {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 4px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-peer-vol-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-peer-mute-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: var(--meet-text);
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.2s;
}

.sidebar-peer-mute-btn:hover {
    background: rgba(255, 255, 255, 0.16);
}

.sidebar-peer-mute-btn.is-muted {
    background: var(--meet-red);
    color: #fff;
}

.sidebar-peer-presets-row {
    display: flex;
    gap: 6px;
    margin-top: 2px;
}

.btn-vol-preset-tag {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--meet-text-muted);
    font-size: 0.72rem;
    padding: 3px 8px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s;
}

.btn-vol-preset-tag:hover {
    background: rgba(138, 180, 248, 0.15);
    color: var(--meet-blue);
    border-color: var(--meet-blue);
}


/* ==============================================================================
   4. SIGNATURE GOOGLE MEET BOTTOM FLOATING CONTROL DOCK
   ============================================================================== */

.meet-dock-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--dock-height);
    background: rgba(32, 33, 36, 0.96);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    z-index: 20;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.meet-dock-left {
    min-width: 160px;
}

.meeting-details-pill {
    background: rgba(255, 255, 255, 0.06);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.86rem;
    color: #fff;
    font-weight: 500;
    display: inline-flex;
}

.meet-dock-center {
    display: flex;
    align-items: center;
    gap: 14px;
}

.dock-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--meet-gray-btn);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.dock-btn:hover {
    background: var(--meet-gray-btn-hover);
    transform: translateY(-2px);
}

.dock-btn.dock-btn-muted {
    background: var(--meet-red);
}

.dock-btn.dock-btn-muted:hover {
    background: var(--meet-red-hover);
}

.dock-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--meet-blue);
    color: #1a1c1e;
    font-size: 0.72rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* Avatar Dock Button */
.btn-dock-avatar {
    padding: 3px;
}

.dock-mini-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a73e8, #8ab4f8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    overflow: hidden;
}

.dock-mini-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Google Meet Red Hangup Button */
.dock-btn-hangup {
    width: 64px;
    border-radius: 9999px;
    background: var(--meet-red);
    box-shadow: 0 4px 14px rgba(234, 67, 53, 0.4);
}

.dock-btn-hangup:hover {
    background: var(--meet-red-hover);
    box-shadow: 0 6px 18px rgba(234, 67, 53, 0.6);
    transform: translateY(-2px);
}

/* PTT Spacebar Pill in Dock */
.dock-ptt-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(138, 180, 248, 0.15);
    border: 1px solid var(--meet-blue);
    color: var(--meet-blue);
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.dock-ptt-pill kbd {
    background: var(--meet-blue);
    color: #1a1c1e;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 800;
}

.meet-dock-right {
    min-width: 160px;
    display: flex;
    justify-content: flex-end;
}

.dock-waveform {
    border-radius: 6px;
    opacity: 0.85;
}


/* ==============================================================================
   5. GOOGLE MEET MODALS & DIALOGS
   ============================================================================== */

.meet-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(6, 8, 14, 0.82);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2500;
    padding: 20px;
    animation: fadeIn 0.16s ease-out both;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.meet-modal {
    background: var(--meet-surface);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.72);
    width: 100%;
    max-width: 620px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: zoomIn 0.16s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes zoomIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-header h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #fff;
}

.btn-modal-close {
    background: transparent;
    border: none;
    color: var(--meet-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 6px;
    border-radius: 50%;
}

.btn-modal-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Modal Tabs */
.modal-tabs {
    display: flex;
    gap: 8px;
    background: rgba(0, 0, 0, 0.25);
    padding: 4px;
    border-radius: 12px;
}

.modal-tab-btn {
    background: transparent;
    border: none;
    color: var(--meet-text-muted);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.86rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-tab-btn:hover {
    color: #fff;
}

.modal-tab-btn.active {
    background: var(--meet-gray-btn);
    color: #fff;
    font-weight: 600;
}

.tab-pane {
    display: none;
    flex-direction: column;
    gap: 18px;
}

.tab-pane.active {
    display: flex;
}

/* Form controls in Modal */
.settings-form-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.settings-form-row label {
    font-size: 0.86rem;
    color: var(--meet-text-muted);
    font-weight: 500;
}

.meet-select {
    background: var(--meet-tile-bg);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 10px 14px;
    color: #fff;
    font-size: 0.9rem;
    outline: none;
    cursor: pointer;
}

.meet-select:focus {
    border-color: var(--meet-blue);
}

/* Switch Cards */
.settings-toggles-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.meet-switch-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.meet-switch-card:hover {
    background: rgba(255, 255, 255, 0.05);
}

.switch-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.switch-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
}

.switch-desc {
    font-size: 0.78rem;
    color: var(--meet-text-muted);
}

.meet-switch-card input[type="checkbox"] {
    display: none;
}

.slider-switch {
    width: 44px;
    height: 24px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 9999px;
    position: relative;
    transition: background 0.25s;
    flex-shrink: 0;
}

.slider-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    right: 4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.25s;
}

.meet-switch-card input[type="checkbox"]:checked + .slider-switch {
    background: var(--meet-blue-dark);
}

.meet-switch-card input[type="checkbox"]:checked + .slider-switch::after {
    transform: translateX(-18px);
}

/* Sliders */
.settings-slider-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.slider-header-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.86rem;
}

.slider-badge-val {
    color: var(--meet-blue);
    font-weight: 700;
}

.meet-range-slider {
    width: 100%;
    accent-color: var(--meet-blue);
    height: 6px;
    cursor: pointer;
}

.field-hint {
    font-size: 0.76rem;
    color: var(--meet-text-muted);
}

/* Weak Mic Callout Box */
.weak-mic-callout {
    background: rgba(138, 180, 248, 0.08);
    border: 1px solid rgba(138, 180, 248, 0.2);
    border-radius: 14px;
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.callout-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.callout-badge {
    color: var(--meet-blue);
    font-weight: 700;
    font-size: 0.86rem;
}

.btn-callout-preset {
    background: var(--alo-blurple);
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-callout-preset:hover {
    background: #185abc;
    transform: scale(1.02);
}

.callout-desc {
    font-size: 0.8rem;
    color: var(--meet-text-muted);
    line-height: 1.5;
}

/* Mic Test Panel */
.mic-test-panel {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(0, 0, 0, 0.2);
    padding: 14px 18px;
    border-radius: 14px;
}

.btn {
    padding: 9px 18px;
    border-radius: 10px;
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--meet-blue-dark);
    color: #fff;
}

.btn-primary:hover {
    background: #185abc;
}

.btn-secondary {
    background: var(--meet-gray-btn);
    color: #fff;
}

.btn-secondary:hover {
    background: var(--meet-gray-btn-hover);
}

.btn-secondary.active {
    background: rgba(138, 180, 248, 0.2);
    color: var(--meet-blue);
}

.test-meter-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.meter-info-line {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--meet-text-muted);
}

.gate-tag {
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.gate-tag.closed {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.gate-tag.open {
    background: rgba(52, 168, 83, 0.2);
    color: var(--meet-green);
}

.meter-track-meet {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    overflow: hidden;
}

.meter-fill-meet {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--meet-blue), var(--meet-green));
    transition: width 0.08s ease-out;
}

.system-logs-box {
    background: #141517;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 12px;
    font-family: monospace;
    font-size: 0.82rem;
    color: #a3e635;
    height: 240px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}


/* ==============================================================================
   6. PROFILE PICTURE & BANNER MODAL (Avatar & Animated GIF / PNG Customizer)
   ============================================================================== */

.avatar-modal-box {
    max-width: 580px;
    width: 95vw;
}

.profile-modal-header-text h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
}

.modal-sub-hint {
    font-size: 0.78rem;
    color: var(--meet-text-muted);
}

/* Profile Modal Tabs (Avatar vs Banner) */
.profile-modal-tabs {
    display: flex;
    gap: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 5px;
    margin: 14px 0 18px 0;
}

.profile-modal-tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: var(--meet-text-muted);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-modal-tab-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.profile-modal-tab-btn.active {
    background: var(--meet-blue);
    color: #fff;
    box-shadow: 0 4px 14px rgba(26, 115, 232, 0.4);
}

/* Avatar Dropzone */
.avatar-dropzone {
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 18px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: rgba(0, 0, 0, 0.15);
}

.avatar-dropzone:hover, .avatar-dropzone.dragover {
    border-color: var(--meet-blue);
    background: rgba(138, 180, 248, 0.08);
}

.current-modal-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a73e8, #8ab4f8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
    font-weight: 700;
    color: #fff;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

.current-modal-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dropzone-title {
    font-size: 0.96rem;
    font-weight: 600;
    color: #fff;
}

.dropzone-hint {
    font-size: 0.78rem;
    color: var(--meet-text-muted);
}

.presets-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

.presets-label {
    font-size: 0.84rem;
    color: var(--meet-text-muted);
}

.presets-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
}

.preset-avatar-circle {
    aspect-ratio: 1;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.preset-avatar-circle:hover {
    transform: scale(1.1);
}

.preset-avatar-circle.selected {
    border-color: #fff;
    box-shadow: 0 0 0 3px var(--meet-blue);
}

/* ==============================================================================
   6.1 DISCORD-STYLE PROFILE BANNER CARD PREVIEW & PRESETS (PNG / GIF)
   ============================================================================== */

.banner-preview-card {
    background: #141822;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    margin-bottom: 16px;
}

.banner-preview-img-container {
    position: relative;
    width: 100%;
    height: 130px;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    overflow: hidden;
}

.banner-preview-bg {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: all 0.3s ease;
}

.banner-preview-bg.has-banner {
    filter: brightness(1.05);
}

.banner-preview-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: var(--meet-text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.banner-preview-badge.is-active {
    background: rgba(16, 185, 129, 0.25);
    border-color: rgba(16, 185, 129, 0.5);
    color: #34d399;
}

.banner-card-user-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 16px 14px 16px;
    position: relative;
}

.banner-card-avatar-wrap {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a73e8, #8ab4f8);
    border: 4px solid #141822;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    margin-top: -34px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}

.banner-card-avatar-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-card-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 4px;
}

.banner-card-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
}

.banner-card-desc {
    font-size: 0.76rem;
    color: var(--meet-text-muted);
}

/* Banner Dropzone */
.banner-dropzone {
    border: 2px dashed rgba(124, 58, 237, 0.4);
    border-radius: 18px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s;
    background: rgba(124, 58, 237, 0.05);
}

.banner-dropzone:hover, .banner-dropzone.dragover {
    border-color: #8b5cf6;
    background: rgba(124, 58, 237, 0.12);
}

.banner-presets-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.preset-banner-card {
    height: 64px;
    border-radius: 12px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.preset-banner-card:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.3);
}

.preset-banner-card.selected {
    border-color: #fff;
    box-shadow: 0 0 0 3px #8b5cf6, 0 6px 18px rgba(139, 92, 246, 0.5);
}

.preset-banner-name {
    position: absolute;
    bottom: 6px;
    right: 8px;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 6px;
    pointer-events: none;
}

.avatar-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-text-danger {
    background: transparent;
    border: none;
    color: #f87171;
    font-size: 0.82rem;
    cursor: pointer;
    font-weight: 500;
}

.btn-text-danger:hover {
    text-decoration: underline;
    color: #ef4444;
}


/* ==============================================================================
   7. RESPONSIVE DESIGN (Mobile & Tablet)
   ============================================================================== */

@media (max-width: 900px) {
    .meet-stage-body {
        padding-bottom: calc(var(--dock-height) + 28px + env(safe-area-inset-bottom, 0px));
    }
    .meet-stage-body:not(.has-presentation) .meet-grid-wrapper {
        padding: 16px 18px 30px;
    }
    .meet-grid[data-count="1"] {
        grid-template-columns: 1fr;
        max-width: 100%;
    }
    .meet-grid[data-count="2"] {
        grid-template-columns: 1fr;
        max-width: 100%;
    }
    .meet-grid[data-count="2"] .meet-tile {
        aspect-ratio: auto;
        min-height: 170px;
        max-height: calc((100dvh - var(--header-height) - var(--dock-height) - 96px) / 2);
    }
    .meet-grid[data-count="3"],
    .meet-grid[data-count="4"] {
        grid-template-columns: repeat(2, 1fr) !important;
        max-width: 100%;
    }
    .meet-grid[data-count="5"],
    .meet-grid[data-count="6"],
    .meet-grid[data-count="7"],
    .meet-grid[data-count="8"] {
        grid-template-columns: repeat(2, 1fr) !important;
        max-width: 100%;
    }

    .meet-dock-container {
        padding: 0 14px;
    }

    .meet-dock-left, .meet-dock-right {
        display: none;
    }

    .meet-sidebar {
        position: absolute;
        top: 0;
        bottom: var(--dock-height);
        left: 0;
        width: 100%;
        max-width: 330px;
    }
}

/* ==============================================================================
   8. GOOGLE MEET SCREEN SHARING & PRESENTATION STAGE
   ============================================================================== */

.meet-stage-body.has-presentation {
    display: flex;
    flex-direction: row;
    gap: 20px;
    padding: 12px 18px calc(var(--dock-height) + 16px) 18px;
    min-height: 0;
    height: calc(100vh - var(--header-height));
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
}

.screen-share-stage {
    flex: 1 1 0;
    min-width: 0;
    min-height: 0;
    height: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    background: #000;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    position: relative;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
    transition: all 0.2s ease-out;
}

.screen-stage-header {
    height: 48px;
    background: rgba(32, 33, 36, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 5;
    flex-shrink: 0;
}

.presenter-badge-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #fff;
    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
}

#presenterNameTag {
    flex: 0 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.presenter-dot {
    width: 10px;
    height: 10px;
    margin: 0 3px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 10px #34d399;
    animation: pulseDot 1.6s infinite ease-in-out;
    flex-shrink: 0;
}

.presenter-audio-badge {
    background: rgba(52, 211, 153, 0.18);
    color: #34d399;
    border: 1px solid rgba(52, 211, 153, 0.35);
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 0.74rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.presenter-fps-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 9px;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    flex-shrink: 0;
    transition: transform 0.18s ease, background 0.2s ease, border-color 0.2s ease;
}

.presenter-fps-badge.is-30fps {
    background: rgba(16, 185, 129, 0.16);
    color: #34d399;
    border: 1px solid rgba(52, 211, 153, 0.38);
}

.presenter-fps-badge.is-60fps {
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.28), rgba(0, 210, 255, 0.22));
    color: #7dd3fc;
    border: 1px solid rgba(0, 210, 255, 0.48);
    box-shadow: 0 0 12px rgba(88, 101, 242, 0.28);
}

/* Live In-Stage 30/60 FPS Segmented Switch */
.stage-fps-switch {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px;
    border-radius: 9px;
    background: rgba(13, 15, 23, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.12);
    flex-shrink: 0;
}

.stage-fps-btn {
    border: none;
    background: transparent;
    color: #94a3b8;
    font-family: inherit;
    font-size: 0.73rem;
    font-weight: 800;
    padding: 4px 9px;
    border-radius: 6px;
    cursor: pointer;
    line-height: 1.1;
    transition: background 0.18s ease, color 0.18s ease, transform 0.15s ease;
}

.stage-fps-btn:hover {
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.07);
}

.stage-fps-btn[data-fps-select="30"].active {
    background: linear-gradient(135deg, #059669, #10b981);
    color: #fff;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

.stage-fps-btn[data-fps-select="60"].active {
    background: linear-gradient(135deg, #5865f2, #0284c7);
    color: #fff;
    box-shadow: 0 2px 10px rgba(88, 101, 242, 0.45);
}

/* ==============================================================================
   8.1 SCREEN SHARE FPS SELECTOR MODAL & SETTINGS CARDS (30 FPS vs 60 FPS)
   ============================================================================== */

.screen-share-modal-box {
    max-width: 650px;
    width: 95vw;
}

.screen-modal-heading-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.screen-modal-heading-group small {
    font-size: 0.76rem;
    font-weight: 400;
    color: var(--meet-text-muted);
}

.screen-share-modal-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.fps-section-intro {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(88, 101, 242, 0.08);
    border: 1px solid rgba(88, 101, 242, 0.22);
}

.fps-intro-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e2e8f0;
    font-size: 0.9rem;
}

.fps-intro-title-row svg {
    color: #818cf8;
    flex-shrink: 0;
}

.fps-section-intro p {
    font-size: 0.78rem;
    color: var(--meet-text-muted);
    line-height: 1.55;
    margin: 0;
}

.fps-modes-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.fps-mode-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-align: right;
    gap: 10px;
    padding: 15px 16px;
    border-radius: 16px;
    background: rgba(21, 24, 36, 0.88);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.fps-mode-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.24);
    background: rgba(27, 31, 46, 0.95);
}

.fps-mode-card.fps-card-30.active {
    border-color: #10b981;
    background: linear-gradient(160deg, rgba(16, 185, 129, 0.14), rgba(21, 24, 36, 0.96) 68%);
    box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.45), 0 10px 26px rgba(16, 185, 129, 0.16);
}

.fps-mode-card.fps-card-60.active {
    border-color: #5865f2;
    background: linear-gradient(160deg, rgba(88, 101, 242, 0.18), rgba(0, 210, 255, 0.08) 45%, rgba(21, 24, 36, 0.96) 80%);
    box-shadow: 0 0 0 1px rgba(88, 101, 242, 0.55), 0 10px 28px rgba(88, 101, 242, 0.24);
}

.fps-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.fps-pill-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 11px;
    border-radius: 9px;
    font-size: 0.88rem;
    font-weight: 900;
    letter-spacing: 0.03em;
}

.fps-pill-number.pill-30 {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(52, 211, 153, 0.35);
}

.fps-pill-number.pill-60 {
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.32), rgba(0, 210, 255, 0.24));
    color: #93c5fd;
    border: 1px solid rgba(96, 165, 250, 0.42);
}

.fps-tag-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 9999px;
    font-size: 0.71rem;
    font-weight: 700;
}

.fps-tag-badge.badge-stability {
    background: rgba(16, 185, 129, 0.14);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.fps-tag-badge.badge-highnet {
    background: rgba(245, 158, 11, 0.16);
    color: #fcd34d;
    border: 1px solid rgba(245, 158, 11, 0.38);
}

.fps-card-title {
    font-size: 0.93rem;
    font-weight: 800;
    color: #f8fafc;
    line-height: 1.4;
}

.fps-card-desc {
    font-size: 0.77rem;
    color: #94a3b8;
    line-height: 1.55;
    margin: 0;
    flex: 1;
}

.fps-specs-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 2px;
}

.fps-spec-chip {
    font-size: 0.69rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.09);
    color: #cbd5e1;
}

.fps-spec-chip.chip-warn {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.3);
    color: #fde68a;
}

.fps-network-callout {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 15px;
    border-radius: 13px;
    margin-top: 12px;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.screen-share-modal-body .fps-network-callout {
    margin-top: 0;
}

.fps-network-callout.mode-30 {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.28);
}

.fps-network-callout.mode-30 .fps-callout-icon {
    color: #34d399;
}

.fps-network-callout.mode-60 {
    background: rgba(245, 158, 11, 0.11);
    border: 1px solid rgba(245, 158, 11, 0.34);
}

.fps-network-callout.mode-60 .fps-callout-icon {
    color: #fbbf24;
}

.fps-callout-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fps-callout-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.fps-callout-body strong {
    font-size: 0.84rem;
    color: #f8fafc;
}

.fps-callout-body span {
    font-size: 0.76rem;
    color: #cbd5e1;
    line-height: 1.5;
}

.screen-share-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-start-screenshare-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #5865f2, #3b82f6);
    box-shadow: 0 6px 20px rgba(88, 101, 242, 0.4);
    padding: 10px 20px;
    border-radius: 11px;
}

.btn-start-screenshare-cta:hover {
    background: linear-gradient(135deg, #4f46e5, #2563eb);
    transform: translateY(-1px);
}

@media (max-width: 640px) {
    .fps-modes-grid {
        grid-template-columns: 1fr;
    }

    .screen-share-modal-footer {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .screen-share-modal-footer .btn {
        width: 100%;
        justify-content: center;
    }
}

@keyframes pulseDot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
}

.screen-stage-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.btn-stage-action {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
    user-select: none;
}

.btn-stage-action:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-stage-action.btn-stage-active {
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.36), rgba(0, 210, 255, 0.22));
    border: 1px solid rgba(129, 140, 248, 0.72);
    color: #eef2ff;
    box-shadow: 0 0 14px rgba(88, 101, 242, 0.34), 0 0 0 1px rgba(0, 210, 255, 0.16) inset;
}

.btn-stage-action.btn-stage-active:hover {
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.5), rgba(0, 210, 255, 0.32));
    border-color: rgba(165, 180, 252, 0.9);
    color: #ffffff;
}

@media (max-width: 1120px) and (min-width: 769px) {
    .screen-stage-actions {
        gap: 6px;
    }
    .btn-stage-action {
        padding: 6px 9px;
        font-size: 0.77rem;
    }
    #stageHideScreenBtn .btn-text-hide-mobile {
        display: none;
    }
}

.btn-stage-stop {
    background: rgba(234, 67, 53, 0.88);
    color: #fff;
}

.btn-stage-stop:hover {
    background: #ea4335;
}

.btn-stage-hide-stream {
    background: rgba(239, 68, 68, 0.16);
    border: 1px solid rgba(248, 113, 113, 0.35);
    color: #fecaca;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.btn-stage-hide-stream:hover {
    background: rgba(220, 38, 38, 0.88);
    border-color: rgba(252, 165, 165, 0.65);
    color: #fff;
    transform: translateY(-1px);
}

/* Hover Eye-Slash (eye-off) Overlay Button on Remote Screen Share */
.btn-hover-hide-stream {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translate(-50%, 10px) scale(0.96);
    z-index: 6;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 9px 18px 9px 14px;
    border-radius: 9999px;
    background: rgba(15, 18, 28, 0.86);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(248, 113, 113, 0.42);
    color: #f8fafc;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s cubic-bezier(0.2, 0.8, 0.2, 1),
                transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1),
                background 0.2s ease,
                border-color 0.2s ease,
                box-shadow 0.2s ease;
    user-select: none;
    white-space: nowrap;
}

.hover-hide-eye-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.22);
    border: 1px solid rgba(248, 113, 113, 0.4);
    color: #fca5a5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s ease, color 0.2s ease;
}

.hover-hide-text-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: right;
    line-height: 1.25;
}

.hover-hide-text-wrap strong {
    font-size: 0.83rem;
    font-weight: 700;
    color: #fff;
}

.hover-hide-text-wrap small {
    font-size: 0.69rem;
    font-weight: 500;
    color: #fca5a5;
}

.screen-share-stage.is-remote-stream:hover .btn-hover-hide-stream,
.screen-share-stage.is-remote-stream .screen-video-container:hover .btn-hover-hide-stream,
.screen-share-stage.is-remote-stream .btn-hover-hide-stream:focus-visible {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
    pointer-events: auto;
}

.btn-hover-hide-stream:hover {
    background: rgba(185, 28, 28, 0.92);
    border-color: rgba(252, 165, 165, 0.78);
    box-shadow: 0 14px 34px rgba(220, 38, 38, 0.45);
}

.btn-hover-hide-stream:hover .hover-hide-eye-icon {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.45);
    color: #fff;
}

.btn-hover-hide-stream:hover .hover-hide-text-wrap small {
    color: #fee2e2;
}

@media (hover: none), (max-width: 768px) {
    .btn-hover-hide-stream {
        bottom: 12px;
        padding: 7px 13px 7px 10px;
        gap: 8px;
    }

    .hover-hide-eye-icon {
        width: 28px;
        height: 28px;
    }

    .hover-hide-text-wrap strong {
        font-size: 0.76rem;
    }

    .hover-hide-text-wrap small {
        display: none;
    }

    .screen-share-stage.is-remote-stream.touch-controls-visible .btn-hover-hide-stream {
        opacity: 1;
        transform: translate(-50%, 0) scale(1);
        pointer-events: auto;
    }
}

/* Re-Watch Hidden Stream Pill on Presenter's Tile & Sidebar Row */
.tile-rewatch-stream-btn {
    position: absolute;
    bottom: 12px;
    left: 12px;
    z-index: 5;
    display: none;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 9999px;
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.92), rgba(37, 99, 235, 0.92));
    border: 1px solid rgba(165, 180, 252, 0.55);
    color: #fff;
    font-family: inherit;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(88, 101, 242, 0.45);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.tile-rewatch-stream-btn:hover {
    transform: translateY(-1px) scale(1.03);
    background: linear-gradient(135deg, #4f46e5, #1d4ed8);
    box-shadow: 0 8px 22px rgba(88, 101, 242, 0.65);
}

.sidebar-rewatch-stream-btn {
    margin-top: 8px;
    width: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 7px 12px;
    border-radius: 10px;
    background: rgba(88, 101, 242, 0.18);
    border: 1px solid rgba(129, 140, 248, 0.42);
    color: #c7d2fe;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.sidebar-rewatch-stream-btn:hover {
    background: rgba(88, 101, 242, 0.85);
    border-color: rgba(165, 180, 252, 0.7);
    color: #fff;
}

.screen-video-container {
    flex: 1 1 0;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    position: relative;
    overflow: hidden;
}

#screenShareVideo {
    position: relative;
    z-index: 1;
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 100%;
    object-fit: contain !important;
    display: block;
    margin: auto;
    background: #000;
    cursor: pointer;
}

#screenShareFallbackImg {
    position: absolute;
    inset: 0;
    z-index: 2;
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 100%;
    object-fit: contain !important;
    display: none;
    margin: auto;
    background: #000;
    pointer-events: none;
    user-select: none;
}

/* Presentation Stage: Fullscreen Native Styles */
.screen-share-stage:fullscreen,
.screen-share-stage:-webkit-full-screen {
    width: 100vw !important;
    height: 100vh !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    border: none !important;
    background: #000 !important;
    padding: 0 !important;
    margin: 0 !important;
}

.screen-share-stage:fullscreen .screen-video-container,
.screen-share-stage:-webkit-full-screen .screen-video-container {
    width: 100% !important;
    height: calc(100vh - 48px) !important;
    max-height: calc(100vh - 48px) !important;
}

.screen-share-stage:fullscreen #screenShareVideo,
.screen-share-stage:-webkit-full-screen #screenShareVideo,
.screen-share-stage:fullscreen #screenShareFallbackImg,
.screen-share-stage:-webkit-full-screen #screenShareFallbackImg {
    width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
}

/* Presentation layout: participant grid becomes sleek column */
.meet-stage-body.has-presentation .meet-grid-wrapper {
    width: 250px;
    max-width: 260px;
    flex-shrink: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    transition: all 0.25s ease;
}

.meet-stage-body.has-presentation .meet-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.meet-stage-body.has-presentation .meet-tile {
    width: 100%;
    height: 150px;
    min-height: 130px;
    flex-shrink: 0;
}

/* Stage Focus Mode: hides side participant column so presentation gets 100% width */
.meet-stage-body.has-presentation.stage-focus-mode .meet-grid-wrapper {
    display: none !important;
}


/* ==============================================================================
   9. GOOGLE MEET IN-CALL CHAT SIDEBAR (پیام حین تماس)
   ============================================================================== */

.meet-chat-sidebar {
    width: 360px;
    background: #202124;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    height: 100%;
    z-index: 10;
    animation: slideInRight 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-permission-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.8rem;
    color: var(--meet-text-muted);
}

.chat-info-card {
    margin: 14px 16px;
    padding: 12px 14px;
    background: #282a2d;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.chat-info-icon {
    color: #8ab4f8;
    margin-top: 2px;
    flex-shrink: 0;
}

.chat-info-text strong {
    display: block;
    color: #e8eaed;
    font-size: 0.82rem;
    margin-bottom: 4px;
}

.chat-info-text p {
    color: #9aa0a6;
    font-size: 0.74rem;
    line-height: 1.45;
    margin: 0;
}

.chat-messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
}

.chat-messages-container::-webkit-scrollbar {
    width: 6px;
}

.chat-messages-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.025);
    border-radius: 999px;
    margin: 8px 0;
}

.chat-messages-container::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(138, 180, 248, 0.36), rgba(88, 101, 242, 0.48));
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-messages-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(138, 180, 248, 0.62), rgba(88, 101, 242, 0.78));
}

.chat-empty-state {
    margin: auto;
    text-align: center;
    color: #5f6368;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-size: 0.82rem;
    padding: 30px 16px;
}

.chat-msg-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 90%;
    animation: fadeInMsg 0.2s ease-out;
}

@keyframes fadeInMsg {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.chat-msg-item.self {
    align-self: flex-start; /* in RTL, flex-start is right side */
}

.chat-msg-item.remote {
    align-self: flex-end; /* in RTL, flex-end is left side */
}

.chat-msg-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.76rem;
}

.chat-sender-name {
    font-weight: 700;
    color: #8ab4f8;
}

.chat-msg-item.remote .chat-sender-name {
    color: #81c995;
}

.chat-msg-time {
    color: #9aa0a6;
    font-size: 0.72rem;
}

.chat-msg-bubble {
    background: #303134;
    color: #e8eaed;
    padding: 9px 14px;
    border-radius: 12px;
    font-size: 0.88rem;
    line-height: 1.5;
    word-break: break-word;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.chat-msg-item.self .chat-msg-bubble {
    background: #174ea6;
    color: #fff;
    border-bottom-right-radius: 2px;
}

.chat-msg-item.remote .chat-msg-bubble {
    background: #3c4043;
    border-bottom-left-radius: 2px;
}

.chat-input-form {
    padding: 12px 16px;
    background: #202124;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-input-form input {
    flex: 1;
    background: #303134;
    border: 1px solid transparent;
    color: #fff;
    font-size: 0.88rem;
    font-family: inherit;
    padding: 10px 14px;
    border-radius: 24px;
    outline: none;
    transition: all 0.2s;
}

.chat-input-form input:focus {
    background: #3c4043;
    border-color: #8ab4f8;
}

.btn-chat-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #8ab4f8;
    border: none;
    color: #202124;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.btn-chat-send:hover {
    background: #aecbfa;
    transform: scale(1.05);
}

.btn-chat-send:active {
    transform: scale(0.95);
}

/* Active Dock Buttons */
.dock-btn.dock-btn-active {
    background: #8ab4f8 !important;
    color: #202124 !important;
    box-shadow: 0 0 14px rgba(138, 180, 248, 0.5);
}

.dock-btn.dock-btn-active svg {
    color: #202124 !important;
    stroke: #202124 !important;
}

.chat-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ea4335;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid #202124;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

/* ==============================================================================
   10. CHAT IMAGE SHARING & ATTACHMENT
   ============================================================================== */

.btn-chat-attach {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--meet-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.btn-chat-attach:hover {
    background: rgba(138, 180, 248, 0.18);
    color: var(--meet-blue);
    border-color: rgba(138, 180, 248, 0.4);
    transform: scale(1.05);
}

.btn-chat-attach:active {
    transform: scale(0.95);
}

.chat-image-preview-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(30, 31, 32, 0.95);
    border: 1px solid rgba(138, 180, 248, 0.3);
    border-radius: 12px;
    padding: 8px 12px;
    margin-bottom: 8px;
    animation: slideUpFade 0.2s ease-out;
}

@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.chat-preview-thumb-container {
    position: relative;
    width: 52px;
    height: 52px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.chat-preview-thumb-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.btn-remove-chat-preview {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    border: none;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-remove-chat-preview:hover {
    background: #ea4335;
}

.chat-preview-text {
    font-size: 0.8rem;
    color: var(--meet-text-muted);
    flex: 1;
    line-height: 1.4;
}

/* Chat Image in Message Bubbles */
.chat-msg-img-box {
    margin-top: 6px;
    border-radius: 12px;
    overflow: hidden;
    max-width: 240px;
    cursor: zoom-in;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    background: rgba(0, 0, 0, 0.2);
}

.chat-msg-img-box:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
    border-color: rgba(138, 180, 248, 0.5);
}

.chat-msg-img-box img {
    display: block;
    width: 100%;
    max-height: 220px;
    object-fit: cover;
    border-radius: 10px;
}

.chat-msg-caption {
    font-size: 0.85rem;
    color: #fff;
    margin-top: 6px;
    word-break: break-word;
}

/* Fullscreen Lightbox Modal */
.image-lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: lightboxFadeIn 0.2s ease-out;
}

@keyframes lightboxFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
}

.lightbox-content {
    position: relative;
    z-index: 10001;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    background: #1e1f20;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
}

.lightbox-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.lightbox-sender-name {
    font-size: 0.92rem;
    font-weight: 600;
    color: #fff;
}

.lightbox-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-lightbox-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-lightbox-action:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.08);
}

.lightbox-img-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    max-width: 85vw;
    max-height: 80vh;
    overflow: auto;
}

.lightbox-img-wrapper img {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

/* ==============================================================================
   11. SOUND PAD (SOUNDBOARD) SIDEBAR & CONTROLS
   ============================================================================== */

.meet-soundpad-sidebar {
    width: 370px;
    max-width: 90vw;
    background: #1e1f20;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.4);
    z-index: 25;
    animation: slideInFromLeft 0.25s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.soundpad-controls-panel {
    padding: 16px;
    background: rgba(255, 255, 255, 0.025);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.soundpad-vol-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.soundpad-vol-row .vol-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--meet-text-muted);
    font-weight: 500;
}

.soundpad-vol-row .vol-val-badge {
    background: rgba(138, 180, 248, 0.15);
    color: var(--meet-blue);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
}

.soundpad-quick-actions {
    display: flex;
    gap: 10px;
}

.btn-soundpad-stop {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(234, 67, 53, 0.15);
    color: #f28b82;
    border: 1px solid rgba(234, 67, 53, 0.3);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-soundpad-stop:hover {
    background: #ea4335;
    color: #fff;
    border-color: #ea4335;
    box-shadow: 0 2px 10px rgba(234, 67, 53, 0.4);
}

.btn-soundpad-add {
    flex: 1.4;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(138, 180, 248, 0.12);
    color: var(--meet-blue);
    border: 1px solid rgba(138, 180, 248, 0.3);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-soundpad-add:hover {
    background: var(--meet-blue);
    color: #202124;
    border-color: var(--meet-blue);
    box-shadow: 0 2px 10px rgba(138, 180, 248, 0.4);
}

/* Soundpad Timeline Player Card */
.soundpad-player-card {
    background: rgba(18, 22, 34, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.soundpad-player-card.active {
    border-color: rgba(138, 180, 248, 0.38);
    background: rgba(24, 30, 48, 0.88);
}

.soundpad-player-card.playing {
    border-color: rgba(129, 201, 149, 0.48);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.14);
}

.soundpad-player-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.soundpad-player-track-info {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
}

.soundpad-player-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: rgba(88, 101, 242, 0.16);
    border: 1px solid rgba(129, 140, 248, 0.28);
    color: #a5b4fc;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.soundpad-player-card.playing .soundpad-player-icon {
    background: rgba(16, 185, 129, 0.18);
    border-color: rgba(16, 185, 129, 0.42);
    color: #6ee7b7;
}

.soundpad-player-titles {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.soundpad-now-title {
    font-size: 0.79rem;
    font-weight: 700;
    color: #e8eaed;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.soundpad-now-status {
    font-size: 0.69rem;
    color: var(--meet-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.soundpad-player-transport {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.btn-soundpad-transport {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: #cbd5e1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.18s ease;
}

.btn-soundpad-transport.primary {
    width: 32px;
    height: 32px;
    background: rgba(138, 180, 248, 0.18);
    border-color: rgba(138, 180, 248, 0.4);
    color: var(--meet-blue);
}

.soundpad-player-card.playing .btn-soundpad-transport.primary {
    background: rgba(16, 185, 129, 0.22);
    border-color: rgba(16, 185, 129, 0.5);
    color: #6ee7b7;
}

.btn-soundpad-transport:hover:not(:disabled) {
    transform: scale(1.06);
    background: rgba(138, 180, 248, 0.3);
    color: #ffffff;
}

.btn-soundpad-transport:disabled {
    opacity: 0.38;
    cursor: not-allowed;
}

.soundpad-timeline-row {
    display: flex;
    align-items: center;
    gap: 8px;
    direction: ltr;
}

.soundpad-time-label {
    font-size: 0.71rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: #94a3b8;
    min-width: 34px;
    text-align: center;
    user-select: none;
}

.soundpad-timeline-track-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    direction: ltr;
}

.soundpad-timeline-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 999px;
    outline: none;
    cursor: pointer;
    --sp-progress: 0%;
    background: linear-gradient(to right, #38bdf8 0%, #818cf8 var(--sp-progress), rgba(255, 255, 255, 0.14) var(--sp-progress), rgba(255, 255, 255, 0.14) 100%);
    transition: height 0.15s ease;
}

.soundpad-timeline-slider:hover:not(:disabled) {
    height: 7px;
}

.soundpad-timeline-slider:disabled {
    opacity: 0.42;
    cursor: not-allowed;
}

.soundpad-timeline-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #38bdf8;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
    cursor: pointer;
    transition: transform 0.14s ease;
}

.soundpad-timeline-slider:hover:not(:disabled)::-webkit-slider-thumb {
    transform: scale(1.18);
}

.soundpad-timeline-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #38bdf8;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
    cursor: pointer;
}

.soundpad-content-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.soundpad-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2px;
}

.section-badge {
    background: rgba(255, 255, 255, 0.08);
    color: #e8eaed;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.section-badge.custom-badge {
    background: rgba(129, 201, 149, 0.15);
    color: var(--meet-green);
    border-color: rgba(129, 201, 149, 0.3);
}

.section-hint {
    font-size: 0.74rem;
    color: var(--meet-text-muted);
}

/* Sound Buttons Grid */
.sound-buttons-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.sound-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 14px 10px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    user-select: none;
}

.sound-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(138, 180, 248, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.sound-card:active {
    transform: translateY(0);
}

.sound-card.playing {
    background: rgba(138, 180, 248, 0.15) !important;
    border-color: var(--meet-blue) !important;
    box-shadow: 0 0 16px rgba(138, 180, 248, 0.4);
}

.sound-emoji {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: rgba(88, 101, 242, 0.14);
    border: 1px solid rgba(129, 140, 248, 0.28);
    color: #a5b4fc;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.sound-card:hover .sound-emoji {
    transform: scale(1.08);
    background: rgba(88, 101, 242, 0.26);
    border-color: rgba(0, 210, 255, 0.45);
    color: #00d2ff;
}

.sound-card.playing .sound-emoji {
    background: rgba(0, 210, 255, 0.2);
    border-color: #00d2ff;
    color: #00d2ff;
    animation: soundBounce 0.5s infinite alternate ease-in-out;
}

@keyframes soundBounce {
    from { transform: scale(1); }
    to { transform: scale(1.2) rotate(6deg); }
}

.sound-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: #e8eaed;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.sound-desc-sub {
    font-size: 0.7rem;
    color: var(--meet-text-muted);
}

/* Playing Wave Indicator */
.sound-playing-wave {
    display: none;
    gap: 3px;
    align-items: flex-end;
    height: 12px;
    margin-top: 2px;
}

.sound-card.playing .sound-playing-wave {
    display: flex;
}

.wave-bar {
    width: 3px;
    background: var(--meet-blue);
    border-radius: 2px;
    animation: waveBarAnim 0.6s infinite ease-in-out alternate;
}

.wave-bar:nth-child(1) { height: 6px; animation-delay: 0.1s; }
.wave-bar:nth-child(2) { height: 12px; animation-delay: 0.2s; }
.wave-bar:nth-child(3) { height: 8px; animation-delay: 0.3s; }
.wave-bar:nth-child(4) { height: 10px; animation-delay: 0.4s; }

@keyframes waveBarAnim {
    0% { height: 3px; }
    100% { height: 12px; }
}

/* Custom Sounds List */
.custom-sounds-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.custom-sound-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 10px 12px;
    transition: all 0.2s;
}

.custom-sound-item:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.15);
}

.custom-sound-item.playing {
    border-color: var(--meet-green);
    background: rgba(129, 201, 149, 0.1);
}

.custom-sound-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    overflow: hidden;
}

.custom-sound-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(88, 101, 242, 0.16);
    border: 1px solid rgba(129, 140, 248, 0.28);
    color: #a5b4fc;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.custom-sound-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.custom-sound-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-custom-play {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(138, 180, 248, 0.15);
    color: var(--meet-blue);
    border: 1px solid rgba(138, 180, 248, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-custom-play:hover {
    background: var(--meet-blue);
    color: #202124;
}

.btn-custom-delete {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: transparent;
    color: var(--meet-text-muted);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-custom-delete:hover {
    background: rgba(234, 67, 53, 0.15);
    color: #f28b82;
}

.sound-empty-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: var(--meet-text-muted);
    font-size: 0.8rem;
    text-align: center;
    line-height: 1.5;
}

/* ==============================================================================
   12. SOUND NOTIFICATION FLOATING TOASTS
   ============================================================================== */

.sound-toast-container {
    position: absolute;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
}

.sound-toast-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(32, 33, 36, 0.95);
    border: 1px solid rgba(138, 180, 248, 0.4);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 16px rgba(138, 180, 248, 0.25);
    backdrop-filter: blur(8px);
    padding: 8px 18px;
    border-radius: 9999px;
    color: #fff;
    font-size: 0.86rem;
    font-weight: 600;
    animation: toastPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: auto;
}

@keyframes toastPop {
    from { opacity: 0; transform: translateY(-12px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.sound-toast-pill.fade-out {
    opacity: 0;
    transform: translateY(-8px) scale(0.95);
}

.toast-sound-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--alo-cyan);
    flex-shrink: 0;
}

.toast-waves {
    display: flex;
    gap: 2px;
    align-items: flex-end;
    height: 10px;
}

.toast-waves span {
    width: 2px;
    background: var(--meet-blue);
    border-radius: 1px;
    animation: waveBarAnim 0.5s infinite ease-in-out alternate;
}

.toast-waves span:nth-child(1) { height: 5px; }
.toast-waves span:nth-child(2) { height: 10px; animation-delay: 0.15s; }
.toast-waves span:nth-child(3) { height: 7px; animation-delay: 0.3s; }

/* ==============================================================================
   13. COMPREHENSIVE RESPONSIVE DESIGN (MOBILE, TABLET, DESKTOP)
   ============================================================================== */

@media (max-width: 900px) {
    .preview-viewport {
        min-height: 310px;
    }

    .meet-stage-body.has-presentation {
        flex-direction: column !important;
        padding: 8px 8px calc(var(--dock-height) + 26px + env(safe-area-inset-bottom, 0px)) 8px !important;
        gap: 10px !important;
        height: calc(100vh - 52px) !important;
    }

    .meet-stage-body.has-presentation .screen-share-stage {
        flex: 1 1 0 !important;
        min-height: 0 !important;
        height: auto !important;
        width: 100% !important;
        max-height: calc(100% - 86px) !important;
    }

    .meet-stage-body.has-presentation .meet-grid-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        height: 78px !important;
        max-height: 78px !important;
        min-height: 68px !important;
        flex-shrink: 0 !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        padding: 2px 4px !important;
    }

    .meet-stage-body.has-presentation .meet-grid {
        display: flex !important;
        flex-direction: row !important;
        gap: 14px !important;
        width: max-content !important;
        height: 100% !important;
        align-content: center !important;
    }

    .meet-stage-body.has-presentation .meet-tile {
        width: 105px !important;
        min-width: 105px !important;
        height: 100% !important;
    }
}


/* Autoplay Notice Banner */
.autoplay-unmute-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #ea4335, #c5221f);
    color: #fff;
    padding: 10px 18px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 16px rgba(234, 67, 53, 0.4);
    animation: pulseAlert 2s infinite ease-in-out;
    transition: all 0.25s ease;
}

.autoplay-unmute-banner:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

@keyframes pulseAlert {
    0%, 100% { opacity: 0.95; }
    50% { opacity: 1; transform: scale(1.005); }
}

/* ==============================================================================
   14. KEYBOARD SHORTCUTS MODAL & HUD NOTIFICATION
   ============================================================================== */

.shortcuts-modal-card {
    background: #202124;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    width: 100%;
    max-width: 560px;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.75);
    overflow: hidden;
    animation: scaleIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.shortcuts-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 20px 22px 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.shortcuts-section {
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 12px 16px;
}

.shortcuts-section-title {
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--meet-blue);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.shortcut-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 0.85rem;
    color: #e8eaed;
}

.shortcut-row:last-child {
    border-bottom: none;
}

.shortcut-keys {
    display: flex;
    align-items: center;
    gap: 6px;
}

.shortcut-keys span {
    font-size: 0.76rem;
    color: var(--meet-text-muted);
}

kbd {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-bottom-width: 2px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
    color: #fff;
    display: inline-block;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 3px 8px;
    min-width: 20px;
    text-align: center;
    line-height: 1.2;
}

/* Quick HUD Shortcut Toast */
.shortcut-hud-toast {
    position: fixed;
    top: 72px;
    left: 50%;
    right: auto;
    width: max-content;
    max-width: calc(100vw - 28px);
    white-space: nowrap;
    transform: translateX(-50%) translateY(-14px);
    background: rgba(22, 23, 26, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #fff;
    padding: 8px 20px;
    border-radius: 9999px;
    font-size: 0.88rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(14px);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: all 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.shortcut-hud-toast.active {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.shortcut-hud-toast .hud-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--alo-cyan);
    flex-shrink: 0;
}

/* Sound card keyboard shortcut pill */
.sound-card-shortcut-tag {
    position: absolute;
    top: 6px;
    left: 6px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 4px;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 1px 5px;
    line-height: 1.2;
    pointer-events: none;
}

@media (max-width: 600px) {
    .btn-text-hide-mobile {
        display: none;
    }
}

/* ==============================================================================
   15. ACTIVE ROOMS DIRECTORY & ROOM NAMING / PUBLIC & PRIVATE SYSTEM
   ============================================================================== */

.lobby-entry-card {
    background: var(--alo-surface);
    border-radius: 22px;
    border: 1px solid rgba(88, 101, 242, 0.24);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.5);
    padding: 22px;
    display: flex;
    flex-direction: column;
    min-height: auto;
    position: relative;
    overflow: hidden;
}

.lobby-entry-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--alo-blurple) 35%, var(--alo-cyan) 65%, transparent 100%);
    pointer-events: none;
}

.lobby-tab-header {
    display: flex;
    gap: 6px;
    background: var(--alo-bg);
    padding: 5px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    margin-bottom: 18px;
}

.lobby-tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 10px;
    background: transparent;
    border: none;
    color: var(--meet-text-muted);
    font-size: 0.88rem;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.16s ease, background-color 0.2s ease, color 0.2s ease;
    position: relative;
}

.lobby-tab-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.lobby-tab-btn.active {
    background: linear-gradient(135deg, #5865f2, #4752c4);
    color: #fff;
    box-shadow: 0 4px 14px rgba(88, 101, 242, 0.36);
}

.lobby-rooms-count-badge {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 9999px;
    line-height: 1.3;
}

.lobby-tab-btn.active .lobby-rooms-count-badge {
    background: rgba(255, 255, 255, 0.3);
}

.label-with-badge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.label-with-badge label {
    margin-bottom: 0;
}

.privacy-status-hint {
    font-size: 0.74rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.privacy-status-hint.public {
    background: rgba(52, 211, 153, 0.15);
    color: #34d399;
    border: 1px solid rgba(52, 211, 153, 0.3);
}

.privacy-status-hint.private {
    background: rgba(245, 158, 11, 0.18);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.35);
}

/* Rooms Directory Container */
.rooms-dir-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
    height: 100%;
}

.rooms-dir-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rooms-search-box {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 0 12px;
    height: 40px;
    transition: border 0.2s;
}

.rooms-search-box:focus-within {
    border-color: var(--meet-blue);
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

.rooms-search-box svg {
    color: var(--meet-text-muted);
    flex-shrink: 0;
}

.rooms-search-box input {
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-family: inherit;
    font-size: 0.86rem;
    width: 100%;
}

.rooms-search-box input::placeholder {
    color: var(--meet-text-muted);
}

.btn-refresh-rooms {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    padding: 0 12px;
    height: 40px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.btn-refresh-rooms:hover {
    background: rgba(255, 255, 255, 0.14);
}

.refresh-icon.spinning {
    animation: spinRefresh 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes spinRefresh {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Room Cards Grid */
.rooms-cards-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 420px;
    overflow-y: auto;
    padding-left: 2px;
}

.room-card-item {
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.room-card-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(26, 115, 232, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.room-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.room-card-title-group {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.room-card-title {
    font-size: 0.94rem;
    font-weight: 700;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.room-card-code {
    font-size: 0.76rem;
    color: var(--meet-text-muted);
    background: rgba(255, 255, 255, 0.06);
    padding: 2px 6px;
    border-radius: 6px;
    flex-shrink: 0;
}

.room-badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.room-badge-public {
    background: rgba(52, 211, 153, 0.15);
    color: #34d399;
    border: 1px solid rgba(52, 211, 153, 0.3);
}

.room-badge-private {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.room-card-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--meet-text-muted);
}

.room-peers-info {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
}

.room-peers-count-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    color: #d1d5db;
}

.room-mini-avatars-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.room-mini-chip {
    font-size: 0.74rem;
    background: rgba(255, 255, 255, 0.08);
    color: #9aa0a6;
    padding: 1px 6px;
    border-radius: 9999px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    max-width: 140px;
}

.btn-room-join-quick {
    background: rgba(88, 101, 242, 0.18);
    border: 1px solid rgba(88, 101, 242, 0.42);
    color: #a5b4fc;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.btn-room-join-quick:hover {
    background: var(--meet-blue);
    color: #fff;
    box-shadow: 0 2px 10px rgba(26, 115, 232, 0.4);
}

.room-empty-state {
    text-align: center;
    padding: 32px 16px;
    color: var(--meet-text-muted);
    font-size: 0.88rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

/* In-Call Top Room Title Styling */
.top-room-title-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.meet-room-title {
    font-size: 0.96rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.2px;
}

.top-room-title-wrapper .meet-room-code {
    font-size: 0.74rem;
    color: var(--meet-text-muted);
}

/* In-Call Rooms Directory Modal */
.in-call-rooms-modal-card {
    background: #202124;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    width: 100%;
    max-width: 580px;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.75);
    overflow: hidden;
    animation: scaleIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.rooms-modal-body {
    padding: 18px 20px 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: 65vh;
}

/* ==============================================================================
   ROOM ROLE SYSTEM & SOUNDPAD PERMISSIONS (Owner & Admin)
   ============================================================================== */
.user-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
    line-height: 1.25;
    white-space: nowrap;
    vertical-align: middle;
}

.role-badge-owner {
    background: linear-gradient(135deg, rgba(249, 171, 0, 0.25), rgba(255, 215, 0, 0.15));
    color: #ffd043;
    border: 1px solid rgba(249, 171, 0, 0.45);
    box-shadow: 0 0 10px rgba(249, 171, 0, 0.2);
}

.role-badge-admin {
    background: linear-gradient(135deg, rgba(26, 115, 232, 0.25), rgba(138, 180, 248, 0.15));
    color: #8ab4f8;
    border: 1px solid rgba(138, 180, 248, 0.45);
    box-shadow: 0 0 10px rgba(26, 115, 232, 0.2);
}

.role-badge-member {
    display: none; /* Keep clean for regular members */
}

/* Role Badge inside Meet Grid Tile */
.tile-role-badge {
    margin-right: 6px;
}

/* Role Action Buttons in Participant Sidebar Row */
.sidebar-peer-role-action-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: 6px;
    padding-top: 5px;
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.btn-role-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 7px;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.btn-role-promote {
    background: rgba(26, 115, 232, 0.16);
    color: #8ab4f8;
    border-color: rgba(138, 180, 248, 0.35);
}

.btn-role-promote:hover {
    background: rgba(26, 115, 232, 0.32);
    border-color: #8ab4f8;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.3);
}

.btn-role-demote {
    background: rgba(234, 67, 53, 0.14);
    color: #f28b82;
    border-color: rgba(242, 139, 130, 0.32);
}

.btn-role-demote:hover {
    background: rgba(234, 67, 53, 0.26);
    border-color: #ea4335;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(234, 67, 53, 0.3);
}

/* Soundpad Role Permission Status Banner */
.soundpad-role-permission-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    margin-bottom: 12px;
    transition: all 0.25s ease;
}

.soundpad-role-permission-banner.unlocked {
    background: linear-gradient(135deg, rgba(26, 115, 232, 0.16), rgba(52, 168, 83, 0.12));
    border: 1px solid rgba(138, 180, 248, 0.3);
}

.soundpad-role-permission-banner.locked {
    background: linear-gradient(135deg, rgba(234, 67, 53, 0.14), rgba(249, 171, 0, 0.1));
    border: 1px solid rgba(234, 67, 53, 0.35);
}

.role-perm-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(88, 101, 242, 0.18);
    border: 1px solid rgba(129, 140, 248, 0.35);
    color: #fbbf24;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.soundpad-role-permission-banner.locked .role-perm-icon {
    background: rgba(234, 67, 53, 0.18);
    border-color: rgba(248, 113, 113, 0.4);
    color: #f87171;
}

.role-perm-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.78rem;
    line-height: 1.35;
}

.role-perm-info strong {
    font-size: 0.84rem;
    font-weight: 700;
}

.soundpad-role-permission-banner.unlocked .role-perm-info strong {
    color: #8ab4f8;
}

.soundpad-role-permission-banner.unlocked .role-perm-info span {
    color: #c4d7f5;
}

.soundpad-role-permission-banner.locked .role-perm-info strong {
    color: #f28b82;
}

.soundpad-role-permission-banner.locked .role-perm-info span {
    color: #fbd5d2;
}

/* Locked Sound Card */
.sound-card.sound-card-locked {
    opacity: 0.55;
    filter: grayscale(40%);
    cursor: not-allowed;
    border-color: rgba(234, 67, 53, 0.25);
}

.sound-card.sound-card-locked:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.04);
    box-shadow: none;
    border-color: rgba(234, 67, 53, 0.45);
}

.sound-card.sound-card-locked::after {
    content: "";
    position: absolute;
    top: 7px;
    right: 7px;
    width: 15px;
    height: 15px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f87171' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E") center/contain no-repeat;
    opacity: 0.9;
}

/* ========================================================================= */
/* ULTRA-MODERN MOBILE UI & RESPONSIVE DESIGN (CASCADE FINAL PRIORITY)        */
/* ========================================================================= */
@media (max-width: 768px) {
    /* 1. Mobile Container & Lag-Free Discord Gaming Lobby Navbar/Cards */
    html, body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }

    #lobbySection,
    .meet-lobby-container {
        padding: 10px 12px calc(24px + env(safe-area-inset-bottom, 0px)) !important;
        background-color: var(--alo-bg) !important;
        max-width: 100vw !important;
        width: 100% !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }

    .lobby-header {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 8px !important;
        padding: 10px 12px !important;
        margin-bottom: 12px !important;
        width: 100% !important;
        background: #151824 !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        border: 1px solid rgba(88, 101, 242, 0.28) !important;
        border-radius: 16px !important;
        box-shadow: 0 8px 22px rgba(0, 0, 0, 0.38) !important;
        box-sizing: border-box !important;
    }

    .lobby-brand {
        gap: 8px !important;
        min-width: 0 !important;
        direction: rtl !important;
    }

    .meet-logo-icon {
        width: 34px !important;
        height: 34px !important;
        border-radius: 10px !important;
    }

    .meet-logo-icon svg {
        width: 24px !important;
        height: 24px !important;
    }

    .lobby-brand h1 {
        font-size: 1rem !important;
        gap: 5px !important;
        white-space: nowrap !important;
        direction: rtl !important;
    }

    .alo-brand-title {
        font-size: 1.16rem !important;
    }

    .brand-badge {
        font-size: 0.64rem !important;
        padding: 2px 6px !important;
    }

    .lobby-top-status {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        flex-wrap: wrap !important;
        gap: 4px !important;
        min-width: 0 !important;
    }

    .status-indicator-pill,
    #lobbyPingPill,
    .btn-install-pwa,
    .offline-status-pill {
        padding: 4px 7px !important;
        font-size: 0.67rem !important;
        gap: 4px !important;
        border-radius: 9999px !important;
        white-space: nowrap !important;
    }

    .lobby-new-features-pill {
        order: 3 !important;
        font-size: 0.72rem !important;
        padding: 6px 10px !important;
        text-align: center !important;
        width: 100% !important;
        justify-content: center !important;
        border-radius: 12px !important;
        white-space: normal !important;
        line-height: 1.45 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Lobby Main Layout */
    .lobby-main {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        gap: 14px !important;
        margin-top: 2px !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    /* Mobile Discord Profile Preview Card & Gaming Join Card (NO heavy blur for smooth Android scrolling) */
    .preview-tile-card,
    .lobby-join-card,
    .join-card-header,
    .lobby-entry-card {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    .preview-tile-card,
    .lobby-entry-card {
        border-radius: 20px !important;
        background: #151824 !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        border: 1px solid rgba(88, 101, 242, 0.25) !important;
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.42) !important;
        overflow: hidden !important;
        min-height: auto !important;
    }

    .join-card-header h2 {
        font-size: 1.26rem !important;
        text-align: center !important;
        line-height: 1.35 !important;
        margin-bottom: 6px !important;
        color: #fff !important;
    }

    .join-card-sub {
        font-size: 0.81rem !important;
        text-align: center !important;
        margin-bottom: 12px !important;
        line-height: 1.55 !important;
        color: #94a3b8 !important;
    }

    .preview-viewport {
        min-height: auto !important;
        aspect-ratio: auto !important;
        padding: 36px 12px 16px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-end !important;
        position: relative !important;
        background: linear-gradient(180deg, #1b2033 0%, #151824 78%) !important;
        overflow: hidden !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .preview-banner-backdrop {
        height: 92px !important;
    }

    .preview-banner-backdrop.has-banner {
        height: 112px !important;
    }

    .preview-avatar-container {
        position: relative !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        margin-bottom: 4px !important;
        width: 100% !important;
    }

    .preview-avatar-wrap,
    .preview-avatar-box,
    .preview-speaking-ring {
        width: 88px !important;
        height: 88px !important;
        border-radius: 50% !important;
    }

    .preview-avatar-box {
        border: 4px solid #151824 !important;
        box-shadow: 0 8px 22px rgba(0, 0, 0, 0.5) !important;
        margin: 0 auto !important;
    }

    .avatar-online-dot {
        width: 18px !important;
        height: 18px !important;
        border-width: 3px !important;
        bottom: 2px !important;
        left: 2px !important;
    }

    .preview-avatar-mute-badge {
        width: 26px !important;
        height: 26px !important;
        border-width: 2.5px !important;
        bottom: 0 !important;
        left: 0 !important;
    }

    .avatar-letter {
        font-size: 2.15rem !important;
    }

    .preview-identity-block {
        margin-top: 8px !important;
        gap: 6px !important;
    }

    .preview-user-tag {
        font-size: 0.96rem !important;
        font-weight: 800 !important;
        color: #fff !important;
    }

    .preview-mic-indicator {
        width: auto !important;
        justify-content: center !important;
        background: #0e1018 !important;
        border-radius: 9999px !important;
        padding: 4px 10px !important;
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
        display: flex !important;
    }

    .avatar-actions-row {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        width: 100% !important;
        max-width: 100% !important;
        gap: 7px !important;
        margin-top: 12px !important;
        box-sizing: border-box !important;
    }

    .btn-avatar-upload,
    .btn-avatar-presets {
        flex: 1 1 calc(50% - 4px) !important;
        max-width: calc(50% - 4px) !important;
        min-width: 0 !important;
        padding: 8px 8px !important;
        font-size: 0.74rem !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        border-radius: 12px !important;
        justify-content: center !important;
        box-sizing: border-box !important;
        min-height: 36px !important;
    }

    #lobbyOpenAvatarModalBtn {
        flex: 1 1 100% !important;
        max-width: 100% !important;
    }

    .preview-quick-actions {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        padding: 10px 12px !important;
        background: #10121c !important;
        border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    #lobbyTestMicBtn {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        min-height: 42px !important;
        padding: 8px 10px !important;
        font-size: 0.78rem !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    /* Modern Entry Card */
    .lobby-entry-card {
        padding: 16px 14px !important;
        min-height: auto !important;
    }

    .lobby-tab-header {
        background: #0d0f17 !important;
        border-radius: 14px !important;
        padding: 4px !important;
        gap: 4px !important;
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
        margin-bottom: 14px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .lobby-tab-btn {
        padding: 9px 8px !important;
        gap: 5px !important;
        border-radius: 11px !important;
        font-size: 0.8rem !important;
        font-weight: 700 !important;
        white-space: nowrap !important;
        min-height: 40px !important;
        transition: transform 0.16s ease, background-color 0.2s ease !important;
    }

    .lobby-tab-btn.active {
        background: linear-gradient(135deg, #5865f2, #4752c4) !important;
        color: #fff !important;
        box-shadow: 0 4px 12px rgba(88, 101, 242, 0.35) !important;
    }

    .input-with-icon {
        padding: 10px 12px !important;
        min-height: 46px !important;
    }

    .input-with-icon input {
        font-size: 16px !important;
    }

    .weak-mic-badge-banner {
        flex-wrap: wrap !important;
        gap: 8px !important;
        padding: 10px 12px !important;
    }

    .btn-banner-action {
        width: 100% !important;
        min-height: 36px !important;
        text-align: center !important;
    }

    .btn-meet-join {
        border-radius: 14px !important;
        padding: 13px 18px !important;
        min-height: 48px !important;
        font-size: 1rem !important;
        font-weight: 800 !important;
        width: 100% !important;
        touch-action: manipulation !important;
        transition: transform 0.16s ease !important;
        box-sizing: border-box !important;
    }

    .btn-meet-join:active {
        transform: scale(0.97) !important;
    }

    .lobby-features-row {
        display: flex !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        flex-wrap: nowrap !important;
        gap: 8px !important;
        scrollbar-width: none !important;
        padding: 4px 2px 8px !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    .lobby-features-row::-webkit-scrollbar {
        display: none !important;
    }

    .feat-badge-item {
        flex: 0 0 auto !important;
        white-space: nowrap !important;
        padding: 6px 12px !important;
        border-radius: 9999px !important;
        font-size: 0.75rem !important;
        background: #151824 !important;
        border: 1px solid rgba(88, 101, 242, 0.22) !important;
    }

    /* 2. In-Call Stage Viewport Lock & Sleek Mobile Top Navbar */
    .meet-call-stage {
        position: fixed !important;
        inset: 0 !important;
        width: 100% !important;
        max-width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        overflow: hidden !important;
    }

    .meet-top-bar {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 8px !important;
        padding: env(safe-area-inset-top, 0px) 12px 0 12px !important;
        background: rgba(18, 20, 26, 0.94) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.09) !important;
        box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35) !important;
        height: calc(52px + env(safe-area-inset-top, 0px)) !important;
        min-height: calc(52px + env(safe-area-inset-top, 0px)) !important;
        flex-shrink: 0 !important;
        z-index: 40 !important;
    }

    .top-left-info {
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        flex: 1 1 0 !important;
        min-width: 0 !important;
        overflow: hidden !important;
    }

    .top-room-title-wrapper {
        min-width: 0 !important;
        overflow: hidden !important;
    }

    .meet-room-title {
        display: block !important;
        max-width: 100% !important;
        font-size: 0.88rem !important;
        font-weight: 700 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .meet-room-code,
    .meet-divider,
    .top-center-clock,
    .top-btn-label,
    #topPeopleToggleBtn,
    #topChatToggleBtn,
    #topSoundpadToggleBtn,
    #topShortcutsToggleBtn {
        display: none !important;
    }

    .top-right-badges {
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        flex-shrink: 0 !important;
    }

    #callPingPill {
        padding: 4px 8px !important;
        font-size: 0.72rem !important;
        gap: 5px !important;
        height: 28px !important;
        border-radius: 9999px !important;
        background: rgba(255, 255, 255, 0.06) !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
    }

    .btn-top-mobile-only {
        display: inline-flex !important;
    }

    #copyMeetingLinkBtn,
    #topRoomsDirBtn,
    #topSettingsBtn,
    #topAvatarBtn {
        width: 34px !important;
        height: 34px !important;
        min-width: 34px !important;
        border-radius: 50% !important;
        padding: 0 !important;
        background: rgba(255, 255, 255, 0.08) !important;
        border: 1px solid rgba(255, 255, 255, 0.11) !important;
        color: #e8eaed !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0 !important;
        touch-action: manipulation !important;
    }

    #copyMeetingLinkBtn:active,
    #topRoomsDirBtn:active,
    #topSettingsBtn:active,
    #topAvatarBtn:active {
        transform: scale(0.92) !important;
        background: rgba(138, 180, 248, 0.22) !important;
        color: var(--meet-blue) !important;
    }

    /* 3. In-Call Stage Grid & Screen Presentation on Mobile */
    .meet-stage-body {
        flex: 1 1 0 !important;
        min-height: 0 !important;
        height: auto !important;
        width: 100% !important;
        padding: 10px 10px calc(98px + env(safe-area-inset-bottom, 0px)) !important;
        box-sizing: border-box !important;
    }

    .meet-stage-body.has-presentation {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        flex: 1 1 0 !important;
        min-height: 0 !important;
        height: auto !important;
        padding: 8px 8px calc(94px + env(safe-area-inset-bottom, 0px)) !important;
    }

    .meet-stage-body.has-presentation .screen-share-stage {
        flex: 1 1 0 !important;
        width: 100% !important;
        min-height: 160px !important;
        max-height: none !important;
        border-radius: 16px !important;
    }

    .screen-stage-header {
        height: 40px !important;
        padding: 0 10px !important;
        gap: 8px !important;
    }

    .presenter-badge-pill {
        font-size: 0.78rem !important;
        gap: 6px !important;
        flex: 1 1 0 !important;
        min-width: 0 !important;
    }

    .presenter-audio-badge {
        font-size: 0.65rem !important;
        padding: 1px 6px !important;
    }

    .presenter-fps-badge {
        font-size: 0.64rem !important;
        padding: 1px 6px !important;
    }

    .stage-fps-switch {
        padding: 2px !important;
        gap: 2px !important;
        border-radius: 7px !important;
    }

    .stage-fps-btn {
        font-size: 0.64rem !important;
        padding: 3px 6px !important;
        border-radius: 5px !important;
    }

    .screen-stage-actions {
        gap: 4px !important;
    }

    .btn-stage-action:not(.btn-stage-stop) {
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
        padding: 0 !important;
        justify-content: center !important;
        border-radius: 8px !important;
    }

    .btn-stage-action:not(.btn-stage-stop) svg {
        width: 15px !important;
        height: 15px !important;
    }

    .btn-stage-stop {
        padding: 4px 8px !important;
        font-size: 0.7rem !important;
        height: 28px !important;
        border-radius: 8px !important;
        white-space: nowrap !important;
    }

    .screen-share-stage:not(.is-remote-stream) .presenter-fps-badge,
    .screen-share-stage:not(.is-remote-stream) .presenter-audio-badge span {
        display: none !important;
    }

    .screen-share-stage:not(.is-remote-stream) .presenter-audio-badge {
        padding: 3px 6px !important;
    }

    /* Compact Participant Strip in Presentation Mode */
    .meet-stage-body.has-presentation .meet-grid-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        height: 84px !important;
        max-height: 84px !important;
        min-height: 80px !important;
        flex-shrink: 0 !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        padding: 2px !important;
        display: flex !important;
        align-items: center !important;
        scrollbar-width: none !important;
    }

    .meet-stage-body.has-presentation .meet-grid-wrapper::-webkit-scrollbar {
        display: none !important;
    }

    .meet-stage-body.has-presentation .meet-grid {
        display: flex !important;
        flex-direction: row !important;
        gap: 8px !important;
        padding: 0 !important;
        width: max-content !important;
        height: 80px !important;
        margin: 0 auto !important;
        align-items: center !important;
    }

    .meet-stage-body.has-presentation .meet-tile {
        width: 118px !important;
        min-width: 118px !important;
        max-width: 118px !important;
        height: 78px !important;
        min-height: 78px !important;
        aspect-ratio: auto !important;
        border-radius: 14px !important;
        justify-content: flex-start !important;
        padding-top: 8px !important;
    }

    .meet-stage-body.has-presentation .meet-tile .tile-avatar,
    .meet-stage-body.has-presentation .meet-tile .speaking-ring {
        width: 38px !important;
        height: 38px !important;
        font-size: 1rem !important;
    }

    .meet-stage-body.has-presentation .meet-tile .tile-top-row {
        top: 5px !important;
        left: 5px !important;
        right: 5px !important;
    }

    .meet-stage-body.has-presentation .meet-tile .tile-status-badges {
        gap: 4px !important;
    }

    .meet-stage-body.has-presentation .meet-tile .tile-mic-badge,
    .meet-stage-body.has-presentation .meet-tile .tile-deafen-badge {
        width: 20px !important;
        height: 20px !important;
    }

    .meet-stage-body.has-presentation .meet-tile .tile-mic-badge svg,
    .meet-stage-body.has-presentation .meet-tile .tile-deafen-badge svg {
        width: 12px !important;
        height: 12px !important;
    }

    .meet-stage-body.has-presentation .meet-tile .tile-avatar-status-badges {
        bottom: -2px !important;
        left: -2px !important;
        gap: 2px !important;
    }

    .meet-stage-body.has-presentation .meet-tile .tile-avatar-mute-overlay,
    .meet-stage-body.has-presentation .meet-tile .tile-avatar-deafen-overlay {
        width: 18px !important;
        height: 18px !important;
        border-width: 2px !important;
    }

    .meet-stage-body.has-presentation .meet-tile .tile-avatar-mute-overlay svg,
    .meet-stage-body.has-presentation .meet-tile .tile-avatar-deafen-overlay svg {
        width: 10px !important;
        height: 10px !important;
    }

    .meet-stage-body.has-presentation .meet-tile .tile-name-pill {
        bottom: 4px !important;
        right: 4px !important;
        left: 4px !important;
        max-width: calc(100% - 8px) !important;
        justify-content: center !important;
        padding: 2px 5px !important;
        font-size: 0.66rem !important;
        border-radius: 6px !important;
        gap: 3px !important;
        overflow: hidden !important;
        white-space: nowrap !important;
    }

    .meet-stage-body.has-presentation .meet-tile .tile-name-pill > span:first-child {
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        min-width: 0 !important;
    }

    .meet-stage-body.has-presentation .meet-tile .tile-self-tag {
        font-size: 0.62rem !important;
        flex-shrink: 0 !important;
    }

    .meet-stage-body.has-presentation .meet-tile .tile-role-badge {
        display: none !important;
    }

    /* Normal (Non-Presentation) Call Grid on Mobile */
    .meet-stage-body:not(.has-presentation) .meet-grid-wrapper {
        padding: 6px 6px 20px !important;
        scroll-padding-bottom: 24px !important;
        height: 100% !important;
        box-sizing: border-box !important;
    }

    .meet-stage-body:not(.has-presentation) .meet-grid {
        gap: 12px !important;
        padding: 4px 4px 12px !important;
        width: 100% !important;
        min-height: min-content !important;
        height: auto !important;
        margin: auto !important;
        display: grid !important;
        align-content: center !important;
    }

    .meet-stage-body:not(.has-presentation) .meet-grid[data-count="1"] {
        grid-template-columns: 1fr !important;
        max-height: 340px !important;
    }

    .meet-stage-body:not(.has-presentation) .meet-grid[data-count="2"] {
        grid-template-columns: 1fr !important;
        grid-template-rows: repeat(2, minmax(130px, 1fr)) !important;
        max-height: 100% !important;
    }

    .meet-stage-body:not(.has-presentation) .meet-grid[data-count="3"],
    .meet-stage-body:not(.has-presentation) .meet-grid[data-count="4"],
    .meet-stage-body:not(.has-presentation) .meet-grid[data-count="5"],
    .meet-stage-body:not(.has-presentation) .meet-grid[data-count="6"],
    .meet-stage-body:not(.has-presentation) .meet-grid[data-count="7"],
    .meet-stage-body:not(.has-presentation) .meet-grid[data-count="8"] {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .meet-stage-body:not(.has-presentation) .meet-tile {
        width: 100% !important;
        min-width: 0 !important;
        aspect-ratio: auto !important;
        min-height: 136px !important;
    }

    .meet-tile {
        min-width: 0 !important;
        min-height: 120px !important;
        border-radius: 18px !important;
        background: rgba(32, 33, 36, 0.9) !important;
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
    }

    .meet-tile .tile-avatar-change-hint,
    .tile-peer-controls-toolbar,
    .tile-vol-toolbar {
        display: none !important;
    }

    .meet-tile .tile-avatar,
    .meet-tile .speaking-ring {
        width: 64px !important;
        height: 64px !important;
        font-size: 1.55rem !important;
    }

    .meet-tile .tile-name-pill {
        bottom: 8px !important;
        right: 8px !important;
        max-width: calc(100% - 16px) !important;
        font-size: 0.76rem !important;
        padding: 4px 10px !important;
        border-radius: 8px !important;
        overflow: hidden !important;
        white-space: nowrap !important;
    }

    .meet-tile .tile-name-pill > span:first-child {
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        min-width: 0 !important;
    }

    /* 4. Modern Mobile Bottom Island Control Dock Navbar */
    .meet-dock-container {
        position: fixed !important;
        bottom: calc(10px + env(safe-area-inset-bottom, 0px)) !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        width: max-content !important;
        max-width: calc(100vw - 16px) !important;
        height: auto !important;
        padding: 7px 10px !important;
        background: rgba(22, 24, 30, 0.92) !important;
        backdrop-filter: blur(24px) !important;
        -webkit-backdrop-filter: blur(24px) !important;
        border: 1px solid rgba(255, 255, 255, 0.14) !important;
        border-radius: 9999px !important;
        box-shadow: 0 12px 34px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
        z-index: 1200 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-sizing: border-box !important;
    }

    .meet-dock-left,
    .meet-dock-right,
    #dockShortcutsBtn,
    #dockSettingsBtn,
    #dockChangeAvatarBtn,
    #dockPttPill {
        display: none !important;
    }

    .meet-dock-center {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;
        flex-wrap: nowrap !important;
    }

    .dock-btn {
        width: 38px !important;
        height: 38px !important;
        min-width: 38px !important;
        flex-shrink: 0 !important;
        border-radius: 50% !important;
        background: rgba(255, 255, 255, 0.09) !important;
        border: 1px solid rgba(255, 255, 255, 0.11) !important;
        color: #fff !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        touch-action: manipulation !important;
        transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    }

    .dock-btn svg {
        width: 19px !important;
        height: 19px !important;
    }

    .dock-btn:active {
        transform: scale(0.92) !important;
    }

    .dock-btn.dock-btn-muted {
        background: linear-gradient(135deg, #ef4444, #dc2626) !important;
        border-color: rgba(248, 113, 113, 0.45) !important;
        box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4) !important;
        color: #fff !important;
    }

    .dock-btn.dock-btn-active {
        background: #8ab4f8 !important;
        border-color: #8ab4f8 !important;
        color: #202124 !important;
        box-shadow: 0 0 14px rgba(138, 180, 248, 0.45) !important;
    }

    #dockMicBtn {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
    }

    #dockMicBtn svg {
        width: 21px !important;
        height: 21px !important;
    }

    #dockMicBtn:not(.dock-btn-muted) {
        background: linear-gradient(135deg, #10b981, #059669) !important;
        border-color: rgba(52, 211, 153, 0.45) !important;
        box-shadow: 0 4px 16px rgba(16, 185, 129, 0.42) !important;
    }

    #dockMicBtn.dock-btn-muted {
        background: linear-gradient(135deg, #ef4444, #dc2626) !important;
        border-color: rgba(248, 113, 113, 0.48) !important;
        box-shadow: 0 4px 16px rgba(239, 68, 68, 0.45) !important;
    }

    #dockLeaveBtn,
    .dock-btn.dock-btn-hangup {
        width: 44px !important;
        height: 38px !important;
        min-width: 44px !important;
        border-radius: 9999px !important;
        background: linear-gradient(135deg, #ef4444, #dc2626) !important;
        border-color: rgba(248, 113, 113, 0.42) !important;
        box-shadow: 0 4px 14px rgba(239, 68, 68, 0.42) !important;
        color: #fff !important;
    }

    .dock-badge,
    .chat-badge {
        top: -3px !important;
        right: -3px !important;
        min-width: 17px !important;
        height: 17px !important;
        font-size: 0.66rem !important;
    }

    /* 5. Modern Native Bottom Sheets for Sidebars on Mobile */
    .meet-sidebar,
    .meet-chat-sidebar,
    .meet-soundpad-sidebar {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        width: 100vw !important;
        max-width: 100vw !important;
        height: 82dvh !important;
        max-height: 85dvh !important;
        border-radius: 28px 28px 0 0 !important;
        background: rgba(20, 21, 26, 0.97) !important;
        backdrop-filter: blur(32px) !important;
        -webkit-backdrop-filter: blur(32px) !important;
        border: 1px solid rgba(255, 255, 255, 0.15) !important;
        border-bottom: none !important;
        box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.8) !important;
        z-index: 1300 !important;
        animation: mobileSheetSlideUp 0.32s cubic-bezier(0.16, 1, 0.3, 1) !important;
    }

    .meet-sidebar[style*="display: none"],
    .meet-chat-sidebar[style*="display: none"],
    .meet-soundpad-sidebar[style*="display: none"] {
        display: none !important;
    }

    .meet-sidebar:not([style*="display: none"]),
    .meet-chat-sidebar:not([style*="display: none"]),
    .meet-soundpad-sidebar:not([style*="display: none"]) {
        display: flex !important;
        flex-direction: column !important;
    }

    .meet-sidebar::before,
    .meet-chat-sidebar::before,
    .meet-soundpad-sidebar::before {
        content: '';
        display: block;
        width: 44px;
        height: 5px;
        background: rgba(255, 255, 255, 0.25);
        border-radius: 3px;
        margin: 10px auto 4px;
        flex-shrink: 0;
    }

    @keyframes mobileSheetSlideUp {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }

    .sidebar-header {
        padding: 8px 16px 12px !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    }

    .btn-sidebar-close {
        width: 38px !important;
        height: 38px !important;
        border-radius: 50% !important;
        background: rgba(255, 255, 255, 0.1) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .chat-input-form {
        padding: 10px 14px calc(12px + env(safe-area-inset-bottom, 0px)) !important;
        background: rgba(16, 17, 20, 0.95) !important;
        border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    }

    .sound-buttons-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        padding: 14px !important;
    }

    .sound-btn {
        padding: 12px 8px !important;
        border-radius: 16px !important;
        background: rgba(255, 255, 255, 0.07) !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        touch-action: manipulation !important;
    }

    /* 6. Modals & Notifications on Mobile */
    .meet-modal,
    .screen-share-modal-box,
    .in-call-rooms-modal-card,
    .lightbox-content,
    .shortcuts-modal-card {
        width: 94vw !important;
        max-width: 94vw !important;
        max-height: 88dvh !important;
        border-radius: 20px !important;
        margin: auto !important;
    }

    .modal-header {
        padding: 14px 16px !important;
        gap: 8px !important;
    }

    .modal-body {
        padding: 16px !important;
    }

    .modal-tabs {
        overflow-x: auto !important;
        scrollbar-width: none !important;
        max-width: calc(100% - 42px) !important;
    }

    .modal-tabs::-webkit-scrollbar {
        display: none !important;
    }

    .modal-tab-btn {
        padding: 8px 12px !important;
        font-size: 0.8rem !important;
        white-space: nowrap !important;
    }

    .sound-toast-container {
        top: calc(58px + env(safe-area-inset-top, 0px)) !important;
        width: 92vw !important;
    }

    .sound-toast-pill {
        font-size: 0.78rem !important;
        padding: 6px 14px !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* Comfortable scaling for modern 390px–768px phones */
@media (min-width: 390px) and (max-width: 768px) {
    .meet-dock-container {
        padding: 8px 12px !important;
    }

    .meet-dock-center {
        gap: 7px !important;
    }

    .dock-btn {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
    }

    #dockMicBtn {
        width: 46px !important;
        height: 46px !important;
        min-width: 46px !important;
    }

    #dockLeaveBtn,
    .dock-btn.dock-btn-hangup {
        width: 48px !important;
        height: 40px !important;
        min-width: 48px !important;
    }
}

/* Compact icon-only install pill below 390px so header stays single-row on 320px-385px */
@media (max-width: 389px) {
    .btn-install-pwa {
        padding: 5px 8px !important;
    }

    .btn-install-pwa .install-pwa-text {
        display: none !important;
    }
}

/* Ultra-compact scaling for narrow <= 359px screens (e.g. 320px) */
@media (max-width: 359px) {
    .meet-lobby-container {
        padding: 8px 10px calc(20px + env(safe-area-inset-bottom, 0px)) !important;
    }

    .lobby-header {
        padding: 7px 8px !important;
        gap: 5px !important;
    }

    .lobby-brand {
        gap: 5px !important;
    }

    .meet-logo-icon {
        width: 28px !important;
        height: 28px !important;
    }

    .meet-logo-icon svg {
        width: 20px !important;
        height: 20px !important;
    }

    .lobby-brand h1 {
        font-size: 0.86rem !important;
    }

    .alo-brand-title {
        font-size: 1.05rem !important;
    }

    .btn-install-pwa {
        padding: 5px 8px !important;
    }

    .btn-install-pwa .install-pwa-text {
        display: none !important;
    }

    .lobby-tab-btn {
        font-size: 0.73rem !important;
        padding: 8px 6px !important;
    }

    .meet-top-bar {
        padding: env(safe-area-inset-top, 0px) 8px 0 8px !important;
        gap: 5px !important;
    }

    .top-right-badges {
        gap: 4px !important;
    }

    #copyMeetingLinkBtn,
    #topRoomsDirBtn,
    #topSettingsBtn,
    #topAvatarBtn {
        width: 31px !important;
        height: 31px !important;
        min-width: 31px !important;
    }

    .meet-dock-container {
        padding: 6px 8px !important;
        max-width: calc(100vw - 12px) !important;
    }

    .meet-dock-center {
        gap: 4px !important;
    }

    .dock-btn {
        width: 34px !important;
        height: 34px !important;
        min-width: 34px !important;
    }

    .dock-btn svg {
        width: 17px !important;
        height: 17px !important;
    }

    #dockMicBtn {
        width: 38px !important;
        height: 38px !important;
        min-width: 38px !important;
    }

    #dockLeaveBtn,
    .dock-btn.dock-btn-hangup {
        width: 38px !important;
        height: 34px !important;
        min-width: 38px !important;
    }

    .screen-stage-header {
        padding: 0 7px !important;
        gap: 5px !important;
    }

    .presenter-audio-badge span {
        display: none !important;
    }

    .presenter-audio-badge {
        padding: 3px 5px !important;
    }

    .stage-fps-btn {
        font-size: 0.58rem !important;
        padding: 2px 4px !important;
    }

    .screen-stage-actions {
        gap: 3px !important;
    }

    .btn-stage-action:not(.btn-stage-stop) {
        width: 26px !important;
        height: 26px !important;
        min-width: 26px !important;
    }

    .btn-stage-stop {
        padding: 3px 6px !important;
        font-size: 0.65rem !important;
        height: 26px !important;
    }
}

/* Standalone Installed PWA Window Polish (Desktop Windowed App, Android WebAPK & iOS Home Screen) */
@media all and (display-mode: standalone), all and (display-mode: minimal-ui) {
    html,
    body.meet-app {
        overscroll-behavior-y: none;
    }
}

body.is-pwa-standalone #installPwaBtn {
    display: none !important;
}

@media all and (display-mode: standalone) {
    #installPwaBtn {
        display: none !important;
    }

    .meet-lobby-container {
        padding-top: max(16px, calc(env(safe-area-inset-top, 0px) + 10px));
        padding-bottom: max(24px, calc(env(safe-area-inset-bottom, 0px) + 16px));
    }
}

/* ========================================================================== */
/* INTERACTIVE CALL + SCREEN SHARE + CHAT DOCUMENT PICTURE-IN-PICTURE (v4.9)  */
/* Google Meet-Style Mini Conference Window on Minimize / Pop-out             */
/* ========================================================================== */

.btn-top-mini-pip.btn-top-active {
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.34), rgba(0, 210, 255, 0.2));
    border-color: rgba(129, 140, 248, 0.72);
    color: #eef2ff;
    box-shadow: 0 0 14px rgba(88, 101, 242, 0.32);
}

@media (max-width: 1180px) {
    #topMiniPipBtn .top-btn-label {
        display: none;
    }
}

@media (max-width: 480px) {
    #topMiniPipBtn {
        width: 31px !important;
        height: 31px !important;
        min-width: 31px !important;
        padding: 0 !important;
        justify-content: center !important;
    }
}

html.alo-doc-pip-html,
body.alo-doc-pip-body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    overflow: hidden !important;
    background: #131316 !important;
    color: #f1f5f9 !important;
    font-family: 'Vazirmatn', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    direction: rtl !important;
    -webkit-font-smoothing: antialiased;
}

.doc-pip-shell {
    --doc-pip-chat-w: 280px;
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: radial-gradient(circle at 50% 0%, rgba(88, 101, 242, 0.09), transparent 55%), #131316;
    color: #f1f5f9;
    overflow: hidden;
    user-select: none;
    box-sizing: border-box;
}

.doc-pip-shell *,
.doc-pip-shell *::before,
.doc-pip-shell *::after {
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

.doc-pip-shell *::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

.doc-pip-shell *::-webkit-scrollbar-track {
    background: transparent;
}

.doc-pip-shell *::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.16);
    border-radius: 999px;
}

/* 1. Top Header Bar (Google Meet PiP Header Layout) */
.doc-pip-header {
    height: 46px;
    min-height: 46px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: rgba(19, 19, 22, 0.96);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
    z-index: 10;
}

.doc-pip-room-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    overflow: hidden;
}

.doc-pip-room-icon {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #9a4b1a, #7c370f);
    color: #fde68a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.doc-pip-room-title {
    font-size: 0.86rem;
    font-weight: 700;
    color: #f8fafc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.doc-pip-meta-sep {
    color: rgba(255, 255, 255, 0.28);
    font-size: 0.85rem;
    flex-shrink: 0;
}

.doc-pip-timer {
    font-size: 0.82rem;
    font-weight: 600;
    color: #cbd5e1;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    flex-shrink: 0;
}

.doc-pip-header-tools {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.doc-pip-people-pill {
    height: 28px;
    padding: 2px 4px 2px 9px;
    border-radius: 999px;
    background: #282932;
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #e2e8f0;
    font-size: 0.76rem;
    font-weight: 700;
}

.doc-pip-people-mini-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #ec4899);
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.doc-pip-people-mini-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.doc-pip-size-presets {
    display: inline-flex;
    align-items: center;
    background: #22242e;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    padding: 2px;
    gap: 2px;
}

.doc-pip-size-btn {
    border: none;
    background: transparent;
    color: #94a3b8;
    font-family: inherit;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease;
    white-space: nowrap;
}

.doc-pip-size-btn:hover {
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.07);
}

.doc-pip-size-btn.is-active {
    background: #5865f2;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(88, 101, 242, 0.4);
}

.doc-pip-icon-btn {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #282932;
    color: #e2e8f0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
    padding: 0;
}

.doc-pip-icon-btn:hover {
    background: #383a47;
    color: #ffffff;
}

.doc-pip-icon-btn.doc-pip-close-btn:hover {
    background: #dc2626;
    border-color: rgba(248, 113, 113, 0.55);
    color: #ffffff;
}

/* 2. Center Workspace (Stage + Optional Resizable Live Chat Split) */
.doc-pip-workspace {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    padding: 8px 10px 4px 10px;
    gap: 0;
    position: relative;
    overflow: hidden;
}

.doc-pip-stage-col {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: hidden;
}

/* Live Screen Share Stage inside PiP */
.doc-pip-screen-box {
    position: relative;
    flex: 1 1 auto;
    min-height: 120px;
    background: #07080d;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

.doc-pip-screen-viewport {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    touch-action: none;
}

.doc-pip-screen-viewport.is-zoomed {
    cursor: grab;
}

.doc-pip-screen-viewport.is-zoomed.is-panning {
    cursor: grabbing;
}

.doc-pip-screen-media {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform-origin: center center;
    transform: translate3d(var(--pip-pan-x, 0px), var(--pip-pan-y, 0px), 0) scale(var(--pip-zoom, 1));
    transition: transform 0.08s ease-out;
    pointer-events: none;
    background: #05060a;
}

.doc-pip-screen-box.is-fit-cover .doc-pip-screen-media {
    object-fit: cover;
}

.doc-pip-screen-topbar {
    position: absolute;
    top: 8px;
    right: 8px;
    left: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    z-index: 5;
    pointer-events: none;
    opacity: 0.94;
    transition: opacity 0.2s ease;
}

.doc-pip-presenter-pill {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(13, 15, 24, 0.84);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.7rem;
    font-weight: 700;
    color: #f1f5f9;
    min-width: 0;
    flex: 0 1 auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.doc-pip-presenter-pill > span:not(.doc-pip-live-dot) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.doc-pip-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 8px #ef4444;
    flex-shrink: 0;
}

.doc-pip-fps-chip {
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(88, 101, 242, 0.28);
    color: #c7d2fe;
    font-size: 0.64rem;
    font-weight: 800;
    flex-shrink: 0;
}

.doc-pip-screen-tools {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: rgba(13, 15, 24, 0.84);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 3px 5px;
    border-radius: 999px;
    flex-shrink: 0;
    white-space: nowrap;
}

.doc-pip-tool-mini-btn {
    border: none;
    background: transparent;
    color: #e2e8f0;
    font-family: inherit;
    font-size: 0.67rem;
    font-weight: 700;
    height: 22px;
    min-width: 22px;
    padding: 0 6px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.15s ease, color 0.15s ease;
}

.doc-pip-tool-mini-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

.doc-pip-tool-mini-btn.is-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #fecaca;
}

.doc-pip-tool-mini-btn.is-danger:hover {
    background: #dc2626;
    color: #ffffff;
}

/* Participant Cards Grid (Matches Google Meet Dark Burgundy / Banner Tile) */
.doc-pip-peers-grid {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    grid-auto-rows: 1fr;
    gap: 8px;
    align-items: stretch;
    justify-content: center;
    overflow-y: auto;
    padding: 2px;
}

.doc-pip-peers-grid[data-peer-count="1"]:not(.is-strip) {
    grid-template-columns: minmax(180px, 520px);
    justify-content: center;
}

.doc-pip-peers-grid.is-strip {
    flex: 0 0 66px;
    height: 66px;
    min-height: 66px;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: flex-start;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0;
}

.doc-pip-peer-card {
    position: relative;
    border-radius: 18px;
    background: linear-gradient(155deg, #522027 0%, #3a1721 55%, #27111a 100%);
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 110px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.doc-pip-peer-card[data-tone="1"] {
    background: linear-gradient(155deg, #1e294b 0%, #171f38 55%, #111629 100%);
}

.doc-pip-peer-card[data-tone="2"] {
    background: linear-gradient(155deg, #1f3f37 0%, #162c27 55%, #101f1c 100%);
}

.doc-pip-peer-card[data-tone="3"] {
    background: linear-gradient(155deg, #3f224c 0%, #2b1836 55%, #1d1126 100%);
}

.doc-pip-peer-card.is-speaking {
    border-color: #22c55e;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.35), 0 8px 24px rgba(0, 0, 0, 0.35);
}

.doc-pip-card-banner {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.42;
    pointer-events: none;
}

.doc-pip-card-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(15, 17, 26, 0.2), rgba(12, 13, 20, 0.72));
}

.doc-pip-card-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    z-index: 3;
}

.doc-pip-status-badge {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(115, 24, 30, 0.92);
    color: #fecaca;
    border: 1px solid rgba(248, 113, 113, 0.35);
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.doc-pip-peer-card.is-muted .doc-pip-status-badge.badge-mic-off,
.doc-pip-peer-card.is-deafened .doc-pip-status-badge.badge-deafen {
    display: inline-flex;
}

.doc-pip-card-avatar-wrap {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.doc-pip-card-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #ffffff;
    font-size: 1.55rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
    border: 2px solid rgba(255, 255, 255, 0.16);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.doc-pip-peer-card.is-speaking .doc-pip-card-avatar {
    border-color: #4ade80;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.28), 0 6px 20px rgba(0, 0, 0, 0.45);
    transform: scale(1.04);
}

.doc-pip-card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.doc-pip-card-name {
    position: absolute;
    bottom: 10px;
    right: 12px;
    max-width: calc(100% - 24px);
    z-index: 3;
    font-size: 0.82rem;
    font-weight: 700;
    color: #f8fafc;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.75);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.doc-pip-rewatch-btn {
    position: absolute;
    bottom: 9px;
    left: 10px;
    z-index: 4;
    border: 1px solid rgba(129, 140, 248, 0.55);
    background: rgba(30, 34, 56, 0.9);
    color: #e0e7ff;
    border-radius: 999px;
    padding: 3px 9px;
    font-family: inherit;
    font-size: 0.68rem;
    font-weight: 700;
    display: none;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.doc-pip-rewatch-btn.is-visible {
    display: inline-flex;
}

.doc-pip-rewatch-btn:hover {
    background: #5865f2;
    color: #ffffff;
}

/* Strip compact overrides when screen share is active */
.doc-pip-peers-grid.is-strip .doc-pip-peer-card {
    flex: 0 0 138px;
    min-width: 138px;
    min-height: 64px;
    height: 64px;
    border-radius: 12px;
    justify-content: flex-start;
    padding: 0 10px;
    gap: 8px;
}

.doc-pip-peers-grid.is-strip .doc-pip-card-avatar {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
}

.doc-pip-peers-grid.is-strip .doc-pip-card-name {
    position: static;
    font-size: 0.74rem;
    max-width: 78px;
}

.doc-pip-peers-grid.is-strip .doc-pip-card-badges {
    top: 5px;
    left: 5px;
    gap: 3px;
}

.doc-pip-peers-grid.is-strip .doc-pip-status-badge {
    width: 19px;
    height: 19px;
}

.doc-pip-peers-grid.is-strip .doc-pip-rewatch-btn {
    display: none !important;
}

/* 3. Draggable Split Resizer Handle between Stage & Chat */
.doc-pip-split-handle {
    width: 10px;
    flex: 0 0 10px;
    cursor: col-resize;
    display: none;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 8;
    touch-action: none;
}

.doc-pip-split-handle::after {
    content: '';
    width: 4px;
    height: 38px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    transition: background 0.16s ease, height 0.16s ease;
}

.doc-pip-split-handle:hover::after,
.doc-pip-split-handle.is-dragging::after {
    background: #818cf8;
    height: 56px;
}

.doc-pip-shell.is-chat-open .doc-pip-split-handle {
    display: flex;
}

/* 4. Live Interactive Chat Column inside PiP */
.doc-pip-chat-col {
    width: var(--doc-pip-chat-w, 280px);
    min-width: 205px;
    max-width: 62%;
    flex: 0 0 var(--doc-pip-chat-w, 280px);
    display: none;
    flex-direction: column;
    background: #1b1d26;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.doc-pip-shell.is-chat-open .doc-pip-chat-col {
    display: flex;
}

.doc-pip-chat-header {
    height: 38px;
    min-height: 38px;
    padding: 0 10px 0 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.02);
}

.doc-pip-chat-title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #e2e8f0;
}

.doc-pip-chat-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 8px 9px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    user-select: text;
}

.doc-pip-chat-empty {
    margin: auto;
    text-align: center;
    color: #64748b;
    font-size: 0.74rem;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.doc-pip-msg {
    display: flex;
    flex-direction: column;
    max-width: 90%;
    gap: 2px;
}

.doc-pip-msg.is-self {
    align-self: flex-start;
}

.doc-pip-msg.is-remote {
    align-self: flex-end;
}

.doc-pip-msg-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.65rem;
    color: #94a3b8;
    padding: 0 4px;
}

.doc-pip-msg-sender {
    font-weight: 700;
    color: #cbd5e1;
}

.doc-pip-msg-bubble {
    padding: 6px 10px;
    border-radius: 12px;
    font-size: 0.77rem;
    line-height: 1.48;
    word-break: break-word;
    background: #282b3a;
    color: #f1f5f9;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.doc-pip-msg.is-self .doc-pip-msg-bubble {
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.88), rgba(79, 70, 229, 0.88));
    color: #ffffff;
    border-color: rgba(129, 140, 248, 0.35);
}

.doc-pip-msg-img {
    display: block;
    max-width: 100%;
    max-height: 140px;
    border-radius: 8px;
    margin-bottom: 4px;
    object-fit: cover;
    cursor: pointer;
}

.doc-pip-img-preview {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 5px 8px;
    background: rgba(88, 101, 242, 0.15);
    border-top: 1px solid rgba(129, 140, 248, 0.28);
    font-size: 0.7rem;
    color: #c7d2fe;
}

.doc-pip-img-preview.is-visible {
    display: flex;
}

.doc-pip-img-preview img {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    object-fit: cover;
}

.doc-pip-chat-form {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 7px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    background: #151720;
}

.doc-pip-chat-input {
    flex: 1 1 auto;
    min-width: 0;
    height: 32px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #232634;
    color: #f8fafc;
    font-family: inherit;
    font-size: 0.76rem;
    padding: 0 11px;
    outline: none;
}

.doc-pip-chat-input:focus {
    border-color: #818cf8;
    background: #282c3d;
}

.doc-pip-chat-send-btn,
.doc-pip-chat-attach-btn {
    width: 30px;
    height: 30px;
    min-width: 30px;
    border-radius: 50%;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: background 0.15s ease, transform 0.15s ease;
}

.doc-pip-chat-attach-btn {
    background: #282b3a;
    color: #cbd5e1;
}

.doc-pip-chat-attach-btn:hover {
    background: #363a4f;
    color: #ffffff;
}

.doc-pip-chat-send-btn {
    background: #5865f2;
    color: #ffffff;
}

.doc-pip-chat-send-btn:hover {
    background: #4f46e5;
}

/* 5. Bottom Call Control Dock (Google Meet Pill Dock Style) */
.doc-pip-dock {
    height: 58px;
    min-height: 58px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #131316;
    flex-shrink: 0;
    z-index: 10;
}

.doc-pip-ctrl-btn {
    position: relative;
    width: 42px;
    height: 40px;
    min-width: 42px;
    border-radius: 999px;
    border: none;
    background: #2b2d38;
    color: #e2e8f0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: background 0.16s ease, color 0.16s ease, border-radius 0.16s ease, transform 0.12s ease;
}

.doc-pip-ctrl-btn:hover {
    background: #393c4a;
    color: #ffffff;
}

/* Exact Google Meet Muted / Deafened Pale-Rose Rounded Square State */
.doc-pip-ctrl-btn.is-muted-state {
    background: #f9dedc;
    color: #601410;
    border-radius: 13px;
}

.doc-pip-ctrl-btn.is-muted-state:hover {
    background: #fce8e6;
    color: #410e0b;
}

.doc-pip-ctrl-btn.is-active-feature {
    background: #8ab4f8;
    color: #0b192c;
    border-radius: 13px;
}

.doc-pip-ctrl-btn.is-active-feature:hover {
    background: #aecbfa;
}

.doc-pip-ctrl-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 999px;
    background: #ef4444;
    color: #ffffff;
    font-size: 0.62rem;
    font-weight: 800;
    display: none;
    align-items: center;
    justify-content: center;
    border: 2px solid #131316;
}

.doc-pip-ctrl-badge.is-visible {
    display: inline-flex;
}

/* Iconic Google Meet Wide Red Hangup Pill */
.doc-pip-hangup-btn {
    width: 58px;
    height: 40px;
    min-width: 58px;
    border-radius: 999px;
    border: none;
    background: #ea4335;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    box-shadow: 0 4px 14px rgba(234, 67, 53, 0.38);
    transition: background 0.16s ease, transform 0.12s ease;
}

.doc-pip-hangup-btn:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

/* Responsive Breakpoints inside Resizable Document PiP Window */
@media (max-width: 540px) {
    .doc-pip-size-presets {
        display: none;
    }

    .doc-pip-shell.is-chat-open .doc-pip-split-handle {
        display: none;
    }

    .doc-pip-shell.is-chat-open .doc-pip-workspace {
        flex-direction: column;
        gap: 6px;
    }

    .doc-pip-shell.is-chat-open .doc-pip-stage-col {
        flex: 0 0 38%;
        min-height: 86px;
    }

    .doc-pip-shell.is-chat-open .doc-pip-peers-grid:not(.is-strip) .doc-pip-card-avatar {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }

    .doc-pip-shell.is-chat-open .doc-pip-chat-col {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        flex: 1 1 auto !important;
    }
}

@media (max-width: 390px) {
    .doc-pip-header {
        height: 40px;
        min-height: 40px;
        padding: 0 8px;
    }

    .doc-pip-room-title {
        max-width: 105px;
        font-size: 0.77rem;
    }

    .doc-pip-dock {
        height: 50px;
        min-height: 50px;
        gap: 5px;
        padding: 0 6px;
    }

    .doc-pip-ctrl-btn {
        width: 36px;
        height: 34px;
        min-width: 36px;
    }

    .doc-pip-hangup-btn {
        width: 48px;
        height: 34px;
        min-width: 48px;
    }

    .doc-pip-card-avatar {
        width: 54px;
        height: 54px;
        font-size: 1.2rem;
    }
}

/* Fallback Draggable & Resizable In-Page Floating PiP Window (for non-Chromium browsers) */
.alo-inline-pip-fallback {
    position: fixed;
    bottom: 84px;
    left: 20px;
    width: 460px;
    height: 340px;
    min-width: 310px;
    min-height: 250px;
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 96px);
    z-index: 9500;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(129, 140, 248, 0.42);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.72), 0 0 0 1px rgba(255, 255, 255, 0.06);
    resize: both;
    display: none;
}

.alo-inline-pip-fallback.is-open {
    display: flex;
}

.alo-inline-pip-fallback .doc-pip-header {
    cursor: move;
}

/* Audio-First Room Load & Post-Audio Resource Sync Status Pill */
.resource-sync-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 11px;
    border-radius: 9999px;
    font-size: 0.76rem;
    font-weight: 600;
    color: #fde68a;
    background: rgba(245, 158, 11, 0.14);
    border: 1px solid rgba(251, 191, 36, 0.34);
    white-space: nowrap;
    transition: opacity 0.25s ease, color 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.resource-sync-pill .resource-sync-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #fbbf24;
    flex-shrink: 0;
    animation: pulseSparkle 1.2s ease-in-out infinite;
}

.resource-sync-pill.is-hydrating {
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.14);
    border-color: rgba(96, 165, 250, 0.36);
}

.resource-sync-pill.is-hydrating .resource-sync-dot {
    background: #60a5fa;
}

.resource-sync-pill.is-synced {
    color: #86efac;
    background: rgba(34, 197, 94, 0.14);
    border-color: rgba(74, 222, 128, 0.36);
}

.resource-sync-pill.is-synced .resource-sync-dot {
    background: #4ade80;
    animation: none;
}

@media (max-width: 640px) {
    .resource-sync-pill {
        max-width: 175px;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 0.7rem;
        padding: 4px 9px;
    }
}

/* Lightweight rendering mode engaged automatically on weak internet / high ping */
body.alo-lightweight-mode .particles,
body.alo-lightweight-mode .resource-sync-pill .resource-sync-dot,
body.alo-lightweight-mode .tile-deafen-badge.is-deafened,
body.alo-lightweight-mode .meet-tile.is-deafened .tile-avatar-deafen-overlay {
    animation: none !important;
}

body.alo-lightweight-mode .floating-dock,
body.alo-lightweight-mode .call-top-bar,
body.alo-lightweight-mode .meet-sidebar,
body.alo-lightweight-mode .tile-mic-badge,
body.alo-lightweight-mode .tile-deafen-badge {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
