           body {
            font-family: 'Google Sans', 'Roboto', sans-serif;
            background: #202124;
            color: #fff;
            margin: 0;
            height: 100vh;
            overflow: hidden;
        }

        .meet-controls {
            background: rgba(32, 33, 36, 0.95);
            backdrop-filter: blur(30px);
            border-radius: 32px;
            margin-bottom: -1.5rem;
            padding: 6px;
            gap: 12px;
            display: flex;
            align-items: center;
            box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

        .meet-button {
            width: 48px;
            height: 48px;
            border-radius: 50%;
            background: rgba(60, 64, 67, 0.8);
            color: #fff;
            border: none;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            overflow: hidden;
            margin: 0;
        }

        .meet-button:hover {
            background: rgba(95, 99, 104, 0.9);
            transform: translateY(-2px);
        }

        .meet-button:active {
            transform: translateY(0);
        }

        .meet-button.active {
            background: #ea4335;
            animation: pulse 2s infinite;
        }

        .meet-button.leave {
            background: #ea4335;
            width: 48px;
            height: 48px;
        }

        .meet-button.leave:hover {
            background: #dc2626;
            transform: scale(1.05);
        }

        .meet-button svg {
            width: 24px;
            height: 24px;
            stroke: currentColor;
            stroke-width: 2;
            transition: transform 0.2s ease;
        }

        .meet-button:hover svg {
            transform: scale(1.1);
        }

        .meet-button.active svg {
            transform: scale(1.1);
        }

        .audio-control-group,
        .video-control-group {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .select-wrapper {
            position: relative;
        }

        .meet-select {
            appearance: none;
            background: rgba(60, 64, 67, 0.8);
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: 20px;
            color: white;
            font-size: 14px;
            padding: 8px 32px 8px 12px;
            cursor: pointer;
            transition: all 0.2s ease;
            min-width: 140px;
            backdrop-filter: blur(10px);
        }

        .meet-select:hover {
            background: rgba(95, 99, 104, 0.9);
            border-color: rgba(255, 255, 255, 0.3);
        }

        .meet-select:focus {
            outline: none;
            border-color: #8ab4f8;
            box-shadow: 0 0 0 2px rgba(138, 180, 248, 0.2);
        }

        .select-wrapper::after {
            content: '';
            position: absolute;
            right: 12px;
            top: 50%;
            transform: translateY(-50%);
            width: 12px;
            height: 12px;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255, 255, 255, 0.8)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: center;
            pointer-events: none;
            transition: all 0.2s ease;
            opacity: 0.8;
        }

        .select-wrapper:hover::after {
            opacity: 1;
            transform: translateY(-50%) translateY(1px);
        }

        /* Host controls styling */
        .host-controls {
            display: flex;
            align-items: center;
            gap: 12px;
            padding-left: 12px;
            border-left: 1px solid rgba(255, 255, 255, 0.1);
        }

        .host-controls .meet-button {
            background: rgba(234, 67, 53, 0.8);
        }

        .host-controls .meet-button:hover {
            background: rgba(220, 38, 38, 0.9);
        }

        /* Mobile optimizations */
        @media (max-width: 768px) {
            .meet-controls {
                padding: 6px;
                gap: 8px;
                bottom: 24px;
            }

            .meet-button {
                width: 44px;
                height: 44px;
            }

            .meet-button.leave {
                width: 44px;
                height: 44px;
            }

            .meet-button svg {
                width: 20px;
                height: 20px;
            }

            .meet-select {
                font-size: 13px;
                padding: 6px 28px 6px 10px;
                min-width: 120px;
            }

            .select-wrapper::after {
                right: 10px;
                width: 10px;
                height: 10px;
            }

            .audio-control-group,
            .video-control-group,
            .host-controls {
                gap: 8px;
            }

            .host-controls {
                padding-left: 8px;
            }
        }

        @keyframes pulse {
            0% {
                box-shadow: 0 0 0 0 rgba(234, 67, 53, 0.4);
            }

            70% {
                box-shadow: 0 0 0 10px rgba(234, 67, 53, 0);
            }

            100% {
                box-shadow: 0 0 0 0 rgba(234, 67, 53, 0);
            }
        }

        /* Mobile optimizations */
        @media (max-width: 768px) {
            .meet-controls {
                padding: 6px;
                gap: 8px;
                bottom: 24px;
            }

            .meet-button {
                width: 44px;
                height: 44px;
            }

            .meet-button.leave {
                width: 44px;
                height: 44px;
            }

            .meet-button svg {
                width: 20px;
                height: 20px;
            }

            .meet-select {
                font-size: 13px;
                padding: 6px 28px 6px 10px;
                min-width: 120px;
            }

            .select-wrapper::after {
                right: 10px;
                width: 10px;
                height: 10px;
            }

            .audio-control-group,
            .video-control-group,
            .host-controls {
                gap: 8px;
            }

            .host-controls {
                padding-left: 8px;
            }
        }

        /* Touch device optimizations */
        @media (hover: none) {
            .meet-button {
                -webkit-tap-highlight-color: transparent;
            }

            .meet-button:active {
                transform: scale(0.95);
            }

            .meet-select {
                padding: 10px 32px 10px 12px;
            }
        }

        /* Loading state for selects */
        .meet-select.loading {
            background-image: linear-gradient(90deg,
                    rgba(32, 33, 36, 0.8) 25%,
                    rgba(42, 43, 46, 0.8) 50%,
                    rgba(32, 33, 36, 0.8) 75%);
            background-size: 200% 100%;
            animation: loading 1.5s infinite linear;
        }

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

            100% {
                background-position: -200% 0;
            }
        }

        .meet-info {
            position: fixed;
            top: 24px;
            left: 24px;
            background: rgba(32, 33, 36, 0.95);
            backdrop-filter: blur(30px);
            border-radius: 8px;
            padding: 12px 16px;
            color: #fff;
            z-index: 100;
            font-size: 14px;
            display: flex;
            align-items: center;
            gap: 12px;
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
            border: 1px solid rgba(255, 255, 255, 0.1);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            transform-origin: left center;
            opacity: 1;
            transform: translateX(0);
        }

        .meet-info.hidden {
            transform: translateX(-100%);
            opacity: 0;
            pointer-events: none;
        }

        .camera-disabled::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.7);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 5;
        }

        .camera-disabled::after {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 40px;
            height: 40px;
            background-image: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20stroke-width%3D%222%22%20fill%3D%22none%22%3E%3Crect%20x%3D%223%22%20y%3D%226%22%20width%3D%2212%22%20height%3D%2212%22%20rx%3D%222%22%20stroke%3D%22%23FFFFFF%22%2F%3E%3Cpath%20d%3D%22M15%209L21%207V17L15%2015%22%20stroke%3D%22%23FFFFFF%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cline%20x1%3D%222%22%20y1%3D%222%22%20x2%3D%2222%22%20y2%3D%2222%22%20stroke%3D%22%23FFFFFF%22%20stroke-width%3D%222%22%2F%3E%3C%2Fsvg%3E");
            background-size: contain;
            background-repeat: no-repeat;
            z-index: 6;
        }

        /* Add camera off indicator for local video */
        .video-wrapper.local .camera-disabled::before {
            background-color: rgba(0, 0, 0, 0.5);
        }

        .video-wrapper.local .camera-disabled::after {
            width: 32px;
            height: 32px;
        }

        .meet-info-toggle {
            position: fixed;
            top: 24px;
            left: 24px;
            width: 36px;
            height: 36px;
            background: rgba(32, 33, 36, 0.95);
            backdrop-filter: blur(30px);
            border-radius: 50%;
            border: 1px solid rgba(255, 255, 255, 0.1);
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            z-index: 99;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
            transform-origin: center;
        }

        .meet-info-toggle:hover {
            background: rgba(32, 33, 36, 1);
            transform: scale(1.05);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        }

        .meet-info-toggle:active {
            transform: scale(0.95);
        }

        .meet-info-toggle svg {
            width: 20px;
            height: 20px;
            transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            transform-origin: center;
        }

        .meet-info.hidden+.meet-info-toggle svg {
            transform: rotate(180deg);
        }

        /* Add a subtle pulse animation to the toggle button when info is hidden */
        @keyframes subtlePulse {
            0% {
                transform: scale(1);
            }

            50% {
                transform: scale(1.05);
            }

            100% {
                transform: scale(1);
            }
        }

        .meet-info.hidden+.meet-info-toggle {
            animation: subtlePulse 2s infinite;
        }

        /* Add a slide-in animation for the info card */
        @keyframes slideIn {
            from {
                transform: translateX(-100%);
                opacity: 0;
            }

            to {
                transform: translateX(0);
                opacity: 1;
            }
        }

        .meet-info:not(.hidden) {
            animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        /* Add a subtle glow effect when hovering over the info card */
        .meet-info:hover {
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
            border-color: rgba(255, 255, 255, 0.2);
        }

        /* Add a subtle scale effect to the copy button */
        #copyRoomId {
            transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        }

        #copyRoomId:hover {
            transform: translateY(-1px);
        }

        #copyRoomId:active {
            transform: translateY(0) scale(0.98);
        }

        @media (max-width: 768px) {
            .meet-info {
                top: 12px;
                left: 12px;
                padding: 8px 12px;
                font-size: 13px;
            }

            .meet-info-toggle {
                top: 12px;
                left: 12px;
                width: 32px;
                height: 32px;
            }
        }

        .meet-info .flex {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .meet-info span {
            color: #9aa0a6;
        }

        .meet-info code {
            background: rgba(255, 255, 255, 0.1);
            padding: 4px 8px;
            border-radius: 4px;
            font-family: 'Roboto Mono', monospace;
            font-size: 13px;
            color: #fff;
            max-width: 200px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        #copyRoomId {
            background: transparent;
            border: none;
            color: #8ab4f8;
            padding: 4px 8px;
            border-radius: 4px;
            cursor: pointer;
            font-size: 13px;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            gap: 4px;
        }

        #copyRoomId:hover {
            background: rgba(138, 180, 248, 0.1);
            color: #fff;
        }

        #copyRoomId:active {
            transform: scale(0.98);
        }

        @media (max-width: 768px) {
            .meet-info {
                top: 12px;
                left: 12px;
                padding: 8px 12px;
                font-size: 13px;
            }

            .meet-info code {
                max-width: 150px;
                font-size: 12px;
            }

            #copyRoomId {
                font-size: 12px;
                padding: 3px 6px;
            }
        }

        .status-text {
            position: fixed;
            top: 24px;
            right: 24px;
            background: rgba(32, 33, 36, 0.95);
            backdrop-filter: blur(30px);
            border-radius: 8px;
            padding: 16px;
            color: #fff;
            z-index: 100;
            font-size: 14px;
            display: flex;
            align-items: center;
            gap: 8px;
            min-width: 200px;
            min-height: 20px;
            box-sizing: border-box;
        }

        .status-text::before {
            content: '';
            width: 8px;
            height: 8px;
            border-radius: 50%;
            display: block;
        }

        .status-text.status-good::before {
            background: #34a853;
        }

        .status-text.status-warning::before {
            background: #fbbc04;
        }

        .status-text.status-bad::before {
            background: #ea4335;
        }

        .video-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
            gap: 16px;
            padding: 24px;
            height: calc(100vh - 80px);
            align-items: center;
            justify-items: center;
            max-width: 1920px;
            margin: 0 auto;
            transition: all 0.3s ease-out;
        }

        /* Single participant layout */
        .video-grid:has(.video-wrapper:only-child) {
            grid-template-columns: 1fr;
            max-width: 1280px;
            padding: 20px;
            height: calc(100vh - 100px);
            align-items: center;
            justify-items: center;
        }

        .video-grid:has(.video-wrapper:only-child) .video-wrapper {
            width: 100%;
            height: 100%;
            max-width: 1280px;
            max-height: calc(100vh - 120px);
            aspect-ratio: 16/9;
            margin: 0 auto;
            border-radius: 12px;
            box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
        }

        .video-grid:has(.video-wrapper:only-child) .video-wrapper video {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 12px;
        }

        /* Two participants layout */
        .video-grid:has(.video-wrapper:nth-child(2)):not(:has(.video-wrapper:nth-child(3))) {
            grid-template-columns: repeat(2, 1fr);
            max-width: 1600px;
            height: calc(100vh - 100px);
        }

        /* Mobile optimizations for two participants */
        @media (max-width: 768px) {

            .video-grid:has(.video-wrapper:only-child) {
                height: calc(100vh - 120px) !important;
                padding: 8px !important;
            }

            .video-grid:has(.video-wrapper:only-child) .video-wrapper video {
                object-fit: cover !important;
            }

            .video-grid:has(.video-wrapper:nth-child(2)):not(:has(.video-wrapper:nth-child(3))) {
                grid-template-columns: 1fr;
                height: calc(100vh - 120px);
                padding: 8px;
                gap: 8px;
                max-width: 100%;
            }

            .video-grid:has(.video-wrapper:nth-child(2)):not(:has(.video-wrapper:nth-child(3))) .video-wrapper {
                max-height: calc(50vh - 80px);
                width: 100%;
                aspect-ratio: 16/9;
                border-radius: 12px;
            }

            /* Landscape orientation for two participants */
            @media (orientation: landscape) {
                .video-grid:has(.video-wrapper:nth-child(2)):not(:has(.video-wrapper:nth-child(3))) {
                    grid-template-columns: repeat(2, 1fr);
                    height: calc(100vh - 80px);
                    padding: 4px;
                    gap: 4px;
                }

                .video-grid:has(.video-wrapper:nth-child(2)):not(:has(.video-wrapper:nth-child(3))) .video-wrapper {
                    max-height: calc(100vh - 100px);
                }
            }

            /* Portrait orientation for two participants */
            @media (orientation: portrait) {
                .video-grid:has(.video-wrapper:only-child) .video-wrapper video {
                    object-fit: cover !important;
                }

                .video-grid:has(.video-wrapper:nth-child(2)):not(:has(.video-wrapper:nth-child(3))) {
                    height: calc(100vh - 140px);
                    padding: 8px;
                    gap: 8px;
                }

                .video-grid:has(.video-wrapper:nth-child(2)):not(:has(.video-wrapper:nth-child(3))) .video-wrapper {
                    max-height: calc(50vh - 100px);
                }
            }
        }

        /* Small mobile devices for two participants */
        @media (max-width: 480px) {
            .video-grid:has(.video-wrapper:only-child) {
                height: calc(100vh - 120px) !important;
                padding: 8px !important;
            }

            .video-grid:has(.video-wrapper:only-child) .video-wrapper video {
                object-fit: cover !important;
            }

            .video-grid:has(.video-wrapper:nth-child(2)):not(:has(.video-wrapper:nth-child(3))) {
                padding: 4px;
                gap: 4px;
            }

            .video-grid:has(.video-wrapper:nth-child(2)):not(:has(.video-wrapper:nth-child(3))) .video-wrapper {
                border-radius: 8px;
            }

            /* Safe area insets for modern mobile devices */
            @supports (padding-top: env(safe-area-inset-top)) {
                .video-grid:has(.video-wrapper:nth-child(2)):not(:has(.video-wrapper:nth-child(3))) {
                    padding-top: calc(env(safe-area-inset-top) + 4px);
                }
            }
        }

        /* Three participants layout */
        .video-grid:has(.video-wrapper:nth-child(3)):not(:has(.video-wrapper:nth-child(4))) {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            grid-template-rows: 1fr 1fr;
            gap: 16px;
            height: calc(100vh - 60px);
            padding: 24px;
            max-width: 1280px;
            margin: 0 auto;
        }

        /* Style for the third participant (bottom center) */
        .video-grid:has(.video-wrapper:nth-child(3)):not(:has(.video-wrapper:nth-child(4))) .video-wrapper:nth-child(3) {
            grid-column: 1 / -1;
            width: 50%;
            justify-self: center;
        }

        /* Ensure all video wrappers maintain 16:9 aspect ratio */
        .video-grid:has(.video-wrapper:nth-child(3)):not(:has(.video-wrapper:nth-child(4))) .video-wrapper {
            aspect-ratio: 16/9;
            width: 100%;
        }

        /* Mobile optimizations for three participants */
        @media (max-width: 768px) {
            .video-grid:has(.video-wrapper:nth-child(3)):not(:has(.video-wrapper:nth-child(4))) {
                grid-template-columns: 1fr;
                grid-template-rows: repeat(3, 1fr);
                height: calc(100vh - 120px);
                padding: 8px;
                gap: 8px;
            }

            .video-grid:has(.video-wrapper:nth-child(3)):not(:has(.video-wrapper:nth-child(4))) .video-wrapper:nth-child(3) {
                width: 100%;
            }

            .video-grid:has(.video-wrapper:nth-child(3)):not(:has(.video-wrapper:nth-child(4))) .video-wrapper {
                max-height: calc((100vh - 160px) / 3);
            }
        }

        /* Landscape mode for mobile */
        @media (max-width: 768px) and (orientation: landscape) {
            .video-grid:has(.video-wrapper:nth-child(3)):not(:has(.video-wrapper:nth-child(4))) {
                grid-template-columns: repeat(2, 1fr);
                grid-template-rows: 1fr 1fr;
                height: calc(100vh - 80px);
                padding: 4px;
                gap: 4px;
            }

            .video-grid:has(.video-wrapper:nth-child(3)):not(:has(.video-wrapper:nth-child(4))) .video-wrapper:nth-child(3) {
                width: 50%;
            }

            .video-grid:has(.video-wrapper:nth-child(3)):not(:has(.video-wrapper:nth-child(4))) .video-wrapper {
                max-height: calc((100vh - 100px) / 2);
            }
        }

        /* Four participants layout */
        .video-grid:has(.video-wrapper:nth-child(4)):not(:has(.video-wrapper:nth-child(5))) {
            grid-template-columns: repeat(2, 1fr);
            grid-template-rows: repeat(2, 1fr);
            height: calc(100vh - 80px);
        }

        /* Five or more participants layout */
        .video-grid:has(.video-wrapper:nth-child(5)) {
            grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
            height: calc(100vh - 80px);
        }

        .video-wrapper {
            position: relative;
            border-radius: 16px;
            overflow: hidden;
            background: #3c4043;
            aspect-ratio: 16/9;
            width: 100%;
            height: 100%;
            max-height: calc(100vh - 180px);
            box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            transform-origin: center;
        }

        .video-wrapper:hover {
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
        }

        .video-wrapper.local {
            border: 2px solid #8ab4f8;
            box-shadow: 0 4px 24px rgba(138, 180, 248, 0.2);
        }

        .video-wrapper video {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.3s ease-out;
        }

        .video-wrapper:hover video {
            transform: none;
        }

        .video-overlay {
            position: absolute;
            bottom: 16px;
            left: 16px;
            background: rgba(32, 33, 36, 0.8);
            padding: 8px 16px;
            border-radius: 8px;
            font-size: 14px;
            color: #fff;
            z-index: 10;
            backdrop-filter: blur(8px);
            transition: all 0.3s ease-out;
        }

        .video-overlay.stats {
            bottom: 56px;
            display: flex;
            align-items: center;
            gap: 8px;
            font-family: 'Roboto Mono', monospace;
            font-size: 12px;
            min-height: 24px;
            min-width: 120px;
            padding: 6px 12px;
            box-sizing: border-box;
            background: rgba(32, 33, 36, 0.9);
        }

        .status-indicator {
            position: absolute;
            top: 16px;
            right: 16px;
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: #34a853;
            box-shadow: 0 0 12px rgba(52, 168, 83, 0.5);
            transition: all 0.3s ease-out;
        }

        /* Mobile optimizations */
        @media (max-width: 768px) {
            .video-grid {
                grid-template-columns: 1fr;
                height: calc(100vh - 120px);
                padding: 8px;
                gap: 8px;
                align-items: stretch;
                justify-items: stretch;
            }

            .video-wrapper {
                max-height: calc(100vh - 200px);
                border-radius: 12px;
                aspect-ratio: 16/9;
                width: 100%;
                height: auto;
            }

            .video-overlay {
                bottom: 12px;
                left: 12px;
                padding: 6px 12px;
                font-size: 13px;
            }

            .video-overlay.stats {
                bottom: 48px;
                padding: 4px 10px;
                font-size: 11px;
            }

            .status-indicator {
                top: 12px;
                right: 12px;
                width: 8px;
                height: 8px;
            }

            /* Improve touch interactions */
            .video-wrapper {
                touch-action: manipulation;
            }

            /* Add active state for touch devices */
            .video-wrapper:active {
                transform: scale(0.98);
                transition: transform 0.1s ease;
            }

            /* Optimize for different mobile orientations */
            @media (orientation: landscape) {
                .video-grid {
                    height: calc(100vh - 80px);
                    padding: 4px;
                    gap: 4px;
                }

                .video-wrapper {
                    max-height: calc(100vh - 100px);
                }
            }

            @media (orientation: portrait) {
                .video-grid {
                    height: calc(100vh - 140px);
                    padding: 8px;
                    gap: 8px;
                }

                .video-wrapper {
                    max-height: calc(100vh - 240px);
                }
            }
        }

        /* Small mobile devices */
        @media (max-width: 480px) {
            .video-grid {
                padding: 4px;
                gap: 4px;
            }

            .video-wrapper {
                border-radius: 8px;
            }

            .video-overlay {
                bottom: 8px;
                left: 8px;
                padding: 4px 8px;
                font-size: 12px;
            }

            .video-overlay.stats {
                bottom: 40px;
                padding: 3px 8px;
                font-size: 10px;
            }

            .status-indicator {
                top: 8px;
                right: 8px;
                width: 6px;
                height: 6px;
            }

            /* Safe area insets for modern mobile devices */
            @supports (padding-top: env(safe-area-inset-top)) {
                .video-grid {
                    padding-top: calc(env(safe-area-inset-top) + 4px);
                }
            }
        }

        /* Landscape orientation optimizations */
        @media (orientation: landscape) and (max-height: 480px) {
            .video-grid {
                height: calc(100vh - 60px);
                padding: 8px;
            }

            .video-wrapper {
                max-height: calc(100vh - 80px);
                aspect-ratio: auto;
            }
        }

        /* Portrait orientation optimizations */
        @media (orientation: portrait) and (max-width: 480px) {
            .video-grid {
                height: calc(100vh - 140px);
            }

            .video-wrapper {
                max-height: calc(100vh - 240px);
            }
        }

        /* Mobile responsive styles */
        @media (max-width: 768px) {
            .video-grid {
                grid-template-columns: 1fr;
                height: calc(100vh - 120px);
                padding: 8px;
            }

            .meet-controls {
                padding: 6px;
                gap: 4px;
            }

            .meet-button {
                width: 36px;
                height: 36px;
            }

            .status-text {
                top: 12px;
                right: 12px;
                font-size: 12px;
                min-width: 150px;
                padding: 10px;
            }

            .meet-info {
                top: 12px;
                left: 12px;
                padding: 10px;
                font-size: 12px;
                max-width: calc(50% - 24px);
            }

            .meet-info .flex {
                flex-wrap: wrap;
                gap: 6px;
            }

            .meet-info code {
                max-width: 100%;
                overflow: hidden;
                text-overflow: ellipsis;
                white-space: nowrap;
            }

            #copyRoomId {
                padding: 4px 8px;
                margin-top: 4px;
                min-height: 30px;
                min-width: 50px;
                display: inline-flex;
                align-items: center;
                justify-content: center;
                transition: all 0.2s ease;
            }

            #copyRoomId:active {
                transform: scale(0.95);
            }

            /* Add a mobile-specific room ID tooltip */
            @media (max-width: 480px) {
                .meet-info code:active {
                    white-space: normal;
                    word-break: break-all;
                    background: rgba(255, 255, 255, 0.2);
                }

                #copyRoomId:active {
                    background: rgba(138, 180, 248, 0.4);
                }
            }

            h1.text-2xl {
                font-size: 1.25rem;
            }

            .join-form {
                width: 90%;
                max-width: 320px;
            }

            .meet-input {
                font-size: 14px;
            }
        }

        @media (max-width: 480px) {
            .video-grid {
                grid-template-columns: 1fr;
                padding: 4px;
                gap: 4px;
            }

            .meet-controls {
                bottom: 4px;
                padding: 4px;
                gap: 2px;
            }

            .meet-button {
                width: 32px;
                height: 32px;
            }

            .meet-button svg {
                width: 20px;
                height: 20px;
            }

            .video-overlay {
                bottom: 8px;
                left: 8px;
                font-size: 11px;
            }

            .status-text,
            .meet-info {
                padding: 8px;
                font-size: 11px;
            }

            .meet-info {
                max-width: calc(60% - 16px);
            }

            .meet-info .flex {
                flex-direction: column;
                align-items: flex-start;
                gap: 4px;
            }

            #copyRoomId {
                margin-top: 2px;
                padding: 4px 8px;
                background: rgba(138, 180, 248, 0.2);
                border-radius: 4px;
                width: 100%;
                text-align: center;
            }
        }

        @media (orientation: landscape) and (max-height: 480px) {
            .video-grid {
                height: calc(100vh - 60px);
            }

            .meet-controls {
                bottom: 2px;
            }

            .video-wrapper {
                height: calc(100vh - 70px);
                aspect-ratio: auto;
            }
        }

        /* Portrait orientation for mobile */
        @media (orientation: portrait) and (max-width: 480px) {
            .camera-overlay {
                width: 80px;
                height: 120px;
                bottom: 70px;
                right: 8px;
            }
        }

        .video-wrapper {
            position: relative;
            border-radius: 8px;
            overflow: hidden;
            background: #3c4043;
            aspect-ratio: 16/9;
        }

        .video-wrapper.local {
            border: 2px solid #8ab4f8;
        }

        .video-wrapper video {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .video-overlay {
            position: absolute;
            bottom: 16px;
            left: 16px;
            background: rgba(32, 33, 36, 0.6);
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 13px;
            color: #fff;
            z-index: 10;
        }

        .video-overlay.stats {
            bottom: 56px;
            display: flex;
            align-items: center;
            gap: 8px;
            font-family: 'Roboto Mono', monospace;
            font-size: 12px;
            min-height: 18px;
            min-width: 120px;
            padding: 4px 8px;
            box-sizing: border-box;
        }

        .status-indicator {
            position: absolute;
            top: 16px;
            right: 16px;
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: #34a853;
        }

        .join-screen {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            height: 100vh;
            width: 100%;
            background: #202124;
            gap: 24px;
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            z-index: 1000;
            transition: opacity 0.3s ease-out, transform 0.3s ease-out;
        }

        .join-form {
            background: rgba(60, 64, 67, 0.3);
            backdrop-filter: blur(30px);
            border-radius: 8px;
            padding: 24px;
            width: 100%;
            max-width: 400px;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
            transition: transform 0.3s ease-out, opacity 0.3s ease-out;
        }

        .meet-input {
            width: 100%;
            padding: 12px;
            background: rgba(32, 33, 36, 0.6);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 4px;
            color: #fff;
            margin-bottom: 16px;
        }

        .meet-input::placeholder {
            color: rgba(255, 255, 255, 0.5);
        }

        .join-button {
            width: 100%;
            padding: 12px;
            background: #1a73e8;
            color: #fff;
            border: none;
            border-radius: 4px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s;
        }

        .join-button:hover {
            background: #1557b0;
        }

        /* Keep existing animation styles */
        @keyframes ping {

            75%,
            100% {
                transform: scale(2);
                opacity: 0;
            }
        }

        @keyframes fadeScale {
            from {
                opacity: 0;
                transform: scale(0.98);
            }

            to {
                opacity: 1;
                transform: scale(1);
            }
        }

        .fade-scale {
            animation: fadeScale 0.5s ease-out forwards;
        }

        .video-wrapper.screen-sharing {
            position: relative;
        }

        .video-wrapper.screen-sharing video {
            width: 100%;
            height: 100%;
            object-fit: contain;
            background: #000;
        }

        .camera-overlay {
            position: fixed;
            bottom: 24px;
            right: 24px;
            width: 180px;
            height: 180px;
            border-radius: 50%;
            overflow: hidden;
            border: 3px solid #8ab4f8;
            z-index: 1000;
            background: #3c4043;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            transition: all 0.3s ease;
            display: none;
            align-items: center;
            justify-content: center;
            transform: scale(1);
        }

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

        .camera-overlay video {
            width: 100%;
            height: 100%;
            object-fit: cover;
            min-width: 100%;
            min-height: 100%;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            transition: all 0.3s ease;
        }

        .camera-overlay:hover {
            transform: scale(1.05);
            box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2);
        }

        .camera-overlay .video-overlay {
            bottom: 8px;
            left: 50%;
            transform: translateX(-50%);
            white-space: nowrap;
            z-index: 2;
        }

        /* Comprehensive responsive camera overlay styles */
        /* Large tablets and small desktops */
        @media (max-width: 1200px) {
            .camera-overlay {
                width: 160px;
                height: 160px;
                bottom: 24px;
                right: 24px;
            }
        }

        /* Tablets */
        @media (max-width: 992px) {
            .camera-overlay {
                width: 140px;
                height: 140px;
                bottom: 24px;
                right: 20px;
            }
        }

        /* Small tablets */
        @media (max-width: 768px) {
            .camera-overlay {
                width: 120px;
                height: 120px;
                bottom: 65px;
                right: 15px;
            }
        }

        /* Large phones */
        @media (max-width: 576px) {
            .camera-overlay {
                width: 100px;
                height: 100px;
                bottom: 60px;
                right: 10px;
                border-width: 2px;
            }

            .camera-overlay .video-overlay {
                font-size: 10px;
                padding: 3px 6px;
            }
        }

        /* Small phones */
        @media (max-width: 480px) {
            .camera-overlay {
                width: 80px;
                height: 80px;
                bottom: 55px;
                right: 8px;
            }

            /* Make buttons more touch-friendly on small screens */
            .meet-button {
                touch-action: manipulation;
                min-width: 44px;
                /* Minimum touch target size */
                min-height: 44px;
                /* Minimum touch target size */
                display: flex;
                align-items: center;
                justify-content: center;
            }

            /* Optimize join form for mobile */
            .join-form {
                padding: 16px;
            }

            .meet-input {
                padding: 10px;
                font-size: 14px;
                height: 44px;
                /* Minimum touch target height */
            }

            .join-button {
                padding: 10px;
                height: 44px;
                /* Minimum touch target height */
            }

            /* Fix video grid layout on very small screens */
            .video-grid {
                grid-template-columns: 1fr;
            }

            /* Improve notification positioning */
            .notification {
                width: 90%;
                max-width: 300px;
                padding: 8px;
                font-size: 12px;
            }
        }

        /* Portrait orientation-specific adjustments */
        @media (orientation: portrait) {
            /* Medium to large phones in portrait */
            @media (max-width: 576px) and (min-width: 481px) {
                .camera-overlay {
                    width: 90px;
                    height: 90px;
                    bottom: 65px;
                }
            }

            /* Small phones in portrait */
            @media (max-width: 480px) {
                .camera-overlay {
                    width: 70px;
                    height: 70px;
                    bottom: 60px;
                    right: 10px;
                    border-width: 2px;
                }
            }
        }

        /* Landscape orientation-specific adjustments */
        @media (orientation: landscape) {

            /* Regular landscape mode */
            .camera-overlay {
                bottom: 65px;
            }

            /* Small landscape mode (like phones) */
            @media (max-height: 480px) {
                .camera-overlay {
                    width: 70px;
                    height: 70px;
                    bottom: 55px;
                    right: 10px;
                    border-width: 2px;
                }

                .camera-overlay .video-overlay {
                    font-size: 9px;
                    padding: 2px 4px;
                    bottom: 4px;
                }

                /* Join form adjustments for landscape */
                .join-screen {
                    padding: 10px;
                }

                .join-form {
                    padding: 12px;
                    max-width: 350px;
                }

                .meet-input,
                .join-button {
                    margin-bottom: 8px;
                    height: 40px;
                }
            }

            /* Very small height (like iPhone in landscape) */
            @media (max-height: 380px) {
                .camera-overlay {
                    width: 60px;
                    height: 60px;
                    bottom: 45px;
                    right: 8px;
                }
            }
        }

        /* Ensure camera-overlay doesn't block controls on very small screens */
        @media (max-width: 480px) and (max-height: 480px) {
            .camera-overlay {
                bottom: 50px;
            }
        }

        .remote-camera-overlay {
            position: absolute;
            bottom: 24px;
            right: 24px;
            width: 180px;
            height: 180px;
            border-radius: 50%;
            overflow: hidden;
            border: 3px solid #8ab4f8;
            background: #3c4043;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            z-index: 10;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .remote-camera-overlay video {
            width: 100%;
            height: 100%;
            object-fit: cover;
            min-width: 100%;
            min-height: 100%;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
        }

        .remote-camera-overlay .video-overlay {
            bottom: 8px;
            left: 50%;
            transform: translateX(-50%);
            white-space: nowrap;
            z-index: 2;
        }

        /* Styles for disabled camera during screen sharing */
        .camera-overlay.camera-disabled::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.7);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 5;
        }

        .camera-overlay.camera-disabled::after {
            content: 'Camera Off';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            color: white;
            font-size: 14px;
            z-index: 6;
            text-align: center;
            width: 100%;
        }

        /* Add style for remote camera disabled as well */
        .remote-camera-overlay.camera-disabled::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.7);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 5;
        }

        .remote-camera-overlay.camera-disabled::after {
            content: 'Camera Off';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            color: white;
            font-size: 14px;
            z-index: 6;
            text-align: center;
            width: 100%;
        }

        /* Add CSS to improve transitions */
        .video-wrapper {
            transition: all 0.3s ease-out;
        }

        .video-overlay {
            transition: background-color 0.3s ease-out, color 0.3s ease-out;
        }

        .status-indicator {
            transition: background-color 0.3s ease-out;
        }

        .status-text {
            transition: background-color 0.3s ease-out, color 0.3s ease-out;
        }

        /* Animations for participant removal */
        @keyframes participant-leave {
            0% {
                opacity: 1;
                transform: scale(1) rotate(0deg);
                filter: brightness(1);
            }

            50% {
                opacity: 0.5;
                transform: scale(0.9) rotate(-2deg);
                filter: brightness(0.8);
            }

            100% {
                opacity: 0;
                transform: scale(0.8) rotate(-5deg);
                filter: brightness(0.5);
            }
        }

        .video-wrapper.leaving {
            animation: participant-leave 0.6s ease-out forwards;
            pointer-events: none;
        }

        /* Animation for room closure */
        @keyframes room-closure {
            0% {
                opacity: 1;
                transform: scale(1);
            }

            50% {
                opacity: 0.8;
                transform: scale(0.95);
            }

            100% {
                opacity: 0;
                transform: scale(0.9);
            }
        }

        .video-container-closing {
            animation: room-closure 0.8s ease-out forwards;
        }

        /* Message animation */
        .meeting-end-message {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: rgba(0, 0, 0, 0.85);
            color: white;
            padding: 20px 40px;
            border-radius: 12px;
            font-size: 18px;
            z-index: 1000;
            opacity: 0;
            transition: opacity 0.4s ease-out;
        }

        .meeting-end-message.visible {
            opacity: 1;
        }

        /* Add CSS for participant entry animation as well */
        @keyframes participant-enter {
            0% {
                opacity: 0;
                transform: scale(0.8) translateY(10px);
            }

            100% {
                opacity: 1;
                transform: scale(1) translateY(0);
            }
        }

        .video-wrapper.entering {
            animation: participant-enter 0.6s ease-out forwards;
        }

        /* Add function to show participant notifications */
        .participant-notification {
            position: fixed;
            top: 80px;
            right: 24px;
            background: rgba(32, 33, 36, 0.95);
            color: white;
            padding: 12px 20px;
            border-radius: 8px;
            font-size: 14px;
            z-index: 1000;
            opacity: 0;
            transform: translateX(20px);
            transition: all 0.3s ease-out;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        }

        .participant-notification.visible {
            opacity: 1;
            transform: translateX(0);
        }

        .participant-notification.leave {
            border-left: 4px solid #ea4335;
        }

        .participant-notification.join {
            border-left: 4px solid #34a853;
        }

        /* Add CSS for disconnected state */
        .video-wrapper.disconnected {
            position: relative;
            opacity: 0.7;
            filter: grayscale(0.5) brightness(0.8);
        }

        .video-wrapper.disconnected::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.3);
            z-index: 5;
            border-radius: 8px;
            border: 2px dashed rgba(255, 255, 255, 0.3);
            pointer-events: none;
        }

        .video-wrapper.disconnected .status-indicator {
            background: #fbbc04;
            animation: pulse 1.5s infinite;
        }

        /* Improve notification styles */
        .participant-notification.warning {
            border-left: 4px solid #fbbc04;
        }

        .participant-notification.message {
            border-left: 4px solid #8ab4f8;
        }

        .participant-notification.info {
            border-left: 4px solid #8ab4f8;
        }

        /* Add transition for smoother UI changes */
        .video-wrapper,
        .video-overlay,
        .status-indicator,
        .status-text {
            transition: all 0.3s ease-out;
        }

        /* Optimize animations for better performance */
        @keyframes participant-leave {
            0% {
                opacity: 1;
                transform: scale(1) translateY(0);
                filter: brightness(1);
            }

            100% {
                opacity: 0;
                transform: scale(0.8) translateY(10px);
                filter: brightness(0.5);
            }
        }

        /* Add loading indicator for reconnection */
        .reconnecting-indicator {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 40px;
            height: 40px;
            border-radius: 50%;
            border: 3px solid rgba(255, 255, 255, 0.2);
            border-top-color: #fff;
            animation: spin 1s linear infinite;
            z-index: 10;
            display: none;
        }

        .video-wrapper.disconnected .reconnecting-indicator {
            display: block;
        }

        @keyframes spin {
            to {
                transform: translate(-50%, -50%) rotate(360deg);
            }
        }

        /* Add styles for clean exit animation */
        .exiting {
            animation: exit-fade 0.5s ease-out forwards;
        }

        @keyframes exit-fade {
            0% {
                opacity: 1;
                transform: scale(1);
            }

            100% {
                opacity: 0;
                transform: scale(0.95);
            }
        }

        /* Add styles for clean entry animation */
        .entering {
            animation: enter-fade 0.5s ease-out forwards;
        }

        @keyframes enter-fade {
            0% {
                opacity: 0;
                transform: scale(0.95);
            }

            100% {
                opacity: 1;
                transform: scale(1);
            }
        }

        /* Improve the fade-scale animation */
        @keyframes fadeScale {
            from {
                opacity: 0;
                transform: scale(0.98);
            }

            to {
                opacity: 1;
                transform: scale(1);
            }
        }

        /* Animation for setup screen entry and exit */
        .fade-scale {
            animation: fadeScale 0.5s ease-out forwards;
        }

        /* Ensure conference screen transitions smoothly */
        #conferenceScreen {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100vh;
            transition: opacity 0.3s ease-out, transform 0.3s ease-out;
            z-index: 500;
        }

        #conferenceScreen.exiting {
            opacity: 0;
            transform: scale(0.95);
        }

        /* Add a transition utility class for screens */
        .screen-transition {
            transition: opacity 0.3s ease-out, transform 0.3s ease-out;
        }

        /* Add fixed positioning to screens to prevent layout shifts */
        .screen {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
        }

        .notification {
            position: fixed;
            top: 80px;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(32, 33, 36, 0.95);
            backdrop-filter: blur(30px);
            border-radius: 8px;
            padding: 12px 16px;
            color: #fff;
            z-index: 1000;
            display: flex;
            align-items: center;
            gap: 12px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
            opacity: 0;
            transform: translateX(-50%) translateY(-20px);
            transition: all 0.3s ease-out;
            font-weight: 400;
            width: 400px;
            max-width: 90%;
        }

        /* Mobile notification adjustments */
        @media (max-width: 768px) {
            .notification {
                width: 90%;
                max-width: 400px;
                top: 60px;
                padding: 10px 14px;
                font-size: 14px;
            }
        }

        @media (max-width: 480px) {
            .notification {
                width: 85%;
                max-width: 320px;
                top: 50px;
                padding: 8px 12px;
                font-size: 13px;
                gap: 8px;
            }
        }

        .notification.visible {
            opacity: 1;
            transform: translateX(-50%) translateY(0);
        }

        /* Port notification adjustments */
        @media (orientation: portrait) and (max-width: 480px) {
            .camera-overlay {
                width: 80px;
                height: 120px;
                bottom: 70px;
                right: 8px;
            }
        }

        /* Room ID styles */
        .meet-info code {
            max-width: 160px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            display: inline-block;
            transition: all 0.2s ease;
        }

        #copyRoomId {
            cursor: pointer;
            user-select: none;
            -webkit-tap-highlight-color: transparent;
        }

        /* Responsive styles for remote camera overlay */
        @media (max-width: 1200px) {
            .remote-camera-overlay {
                width: 160px;
                height: 160px;
            }
        }

        @media (max-width: 992px) {
            .remote-camera-overlay {
                width: 140px;
                height: 140px;
            }
        }

        @media (max-width: 768px) {
            .remote-camera-overlay {
                width: 120px;
                height: 120px;
                bottom: 20px;
                right: 20px;
            }
        }

        @media (max-width: 576px) {
            .remote-camera-overlay {
                width: 100px;
                height: 100px;
                bottom: 16px;
                right: 16px;
                border-width: 2px;
            }

            .remote-camera-overlay .video-overlay {
                font-size: 10px;
                padding: 3px 6px;
            }
        }

        @media (max-width: 480px) {
            .remote-camera-overlay {
                width: 80px;
                height: 80px;
                bottom: 12px;
                right: 12px;
            }
        }

        @media (orientation: landscape) and (max-height: 480px) {
            .remote-camera-overlay {
                width: 70px;
                height: 70px;
                bottom: 10px;
                right: 10px;
                border-width: 2px;
            }

            .remote-camera-overlay .video-overlay {
                font-size: 9px;
                padding: 2px 4px;
                bottom: 4px;
            }
        }

        @media (max-width: 576px) {

            .camera-overlay.camera-disabled::after,
            .remote-camera-overlay.camera-disabled::after {
                font-size: 12px;
            }
        }

        @media (max-width: 480px) {

            .camera-overlay.camera-disabled::after,
            .remote-camera-overlay.camera-disabled::after {
                font-size: 10px;
            }
        }

        @media (orientation: landscape) and (max-height: 380px) {

            .camera-overlay.camera-disabled::after,
            .remote-camera-overlay.camera-disabled::after {
                font-size: 9px;
            }
        }

        /* Enhanced remote camera positioning for screen sharing */
        .video-wrapper.screen-sharing .remote-camera-overlay {
            display: flex;
            align-items: center;
            justify-content: center;
            position: absolute;
            z-index: 20;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        }

        .video-wrapper.screen-sharing .remote-camera-overlay video {
            object-fit: cover;
            min-width: 100%;
            min-height: 100%;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 100%;
            height: 100%;
        }

        /* Fix remote camera positioning on different screen sizes during screen sharing */
        @media (max-width: 576px) {
            .video-wrapper.screen-sharing .remote-camera-overlay {
                width: 100px;
                height: 100px;
                bottom: 16px;
                right: 16px;
                border-width: 2px;
            }
        }

        @media (max-width: 480px) {
            .video-wrapper.screen-sharing .remote-camera-overlay {
                width: 70px;
                height: 70px;
                bottom: 12px;
                right: 12px;
            }
        }

        @media (orientation: landscape) and (max-height: 480px) {
            .video-wrapper.screen-sharing .remote-camera-overlay {
                width: 65px;
                height: 65px;
                bottom: 10px;
                right: 10px;
                border-width: 2px;
            }
        }

        @media (orientation: landscape) and (max-height: 380px) {
            .video-wrapper.screen-sharing .remote-camera-overlay {
                width: 55px;
                height: 55px;
                bottom: 8px;
                right: 8px;
            }
        }

        .video-wrapper.screen-sharing .remote-camera-overlay .video-overlay {
            bottom: 12px;
            left: 50%;
            transform: translateX(-50%);
            white-space: nowrap;
            z-index: 5;
            font-size: 12px;
            padding: 3px 6px;
            background: rgba(0, 0, 0, 0.7);
        }

        /* Adjust text size for small screens */
        @media (max-width: 576px) {
            .video-wrapper.screen-sharing .remote-camera-overlay .video-overlay {
                font-size: 10px;
                padding: 2px 4px;
            }
        }

        @media (max-width: 480px) {
            .video-wrapper.screen-sharing .remote-camera-overlay .video-overlay {
                font-size: 9px;
                padding: 2px 3px;
            }
        }

        @media (orientation: landscape) and (max-height: 480px) {
            .video-wrapper.screen-sharing .remote-camera-overlay .video-overlay {
                font-size: 8px;
                padding: 1px 3px;
                bottom: 4px;
            }
        }

        /* Camera off state during screen sharing */
        .video-wrapper.screen-sharing .remote-camera-overlay.camera-disabled::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.8);
            z-index: 6;
        }

        .video-wrapper.screen-sharing .remote-camera-overlay.camera-disabled::after {
            content: 'Camera Off';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            color: white;
            z-index: 7;
            text-align: center;
            width: 100%;
            font-size: 12px;
        }

        @media (max-width: 576px) {
            .video-wrapper.screen-sharing .remote-camera-overlay.camera-disabled::after {
                font-size: 10px;
            }
        }

        @media (max-width: 480px) {
            .video-wrapper.screen-sharing .remote-camera-overlay.camera-disabled::after {
                font-size: 8px;
            }
        }

        /* Ensure remote camera overlay is visible when rejoining during screen share */
        .video-wrapper.screen-sharing {
            position: relative;
        }

        /* Fix for rejoining during screen share - ensure camera overlay is visible */
        .video-wrapper.screen-sharing:not(.has-remote-camera)::after {
            content: '';
            position: absolute;
            z-index: 1;
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .video-wrapper.screen-sharing.has-remote-camera .remote-camera-overlay {
            visibility: visible;
            opacity: 1;
        }

        /* Ensure the remote camera overlay has proper initial visibility */
        .remote-camera-overlay {
            visibility: visible;
            opacity: 1;
            transition: visibility 0.3s ease, opacity 0.3s ease;
        }

        /* Android Chrome specific fixes */
        @supports (-webkit-touch-callout: none) and (not (translate: none)) {

            /* Target Android Chrome */
            .meet-controls {
                position: fixed !important;
                display: flex !important;
                opacity: 1 !important;
                visibility: visible !important;
                z-index: 2000 !important;
                bottom: 50px !important;
                /* Higher position to ensure reachability */
                left: 50% !important;
                transform: translateX(-50%) !important;
                background: rgba(32, 33, 36, 0.95) !important;
                backdrop-filter: blur(30px) !important;
                border-radius: 32px !important;
                padding: 6px !important;
                gap: 8px !important;
                width: auto !important;
                min-width: 200px !important;
                box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
            }

            .meet-button {
                width: 48px !important;
                /* Larger touch target */
                height: 48px !important;
                /* Larger touch target */
                min-width: 48px !important;
                min-height: 48px !important;
                border-radius: 50% !important;
                background-color: #3c4043 !important;
                color: #fff !important;
                border: none !important;
                cursor: pointer !important;
                display: flex !important;
                align-items: center !important;
                justify-content: center !important;
                margin: 0 4px !important;
                opacity: 1 !important;
                transition: background-color 0.2s ease !important;
                -webkit-tap-highlight-color: transparent !important;
            }

            /* Fix for the active state of buttons on Android */
            .meet-button.active {
                background-color: #ea4335 !important;
            }

            .meet-button.leave {
                background: #ea4335 !important;
            }

            .meet-button svg {
                width: 24px !important;
                height: 24px !important;
                stroke: currentColor !important;
                stroke-width: 2 !important;
                display: block !important;
                opacity: 1 !important;
            }
        }

        /* Alternative Android Chrome fix using user agent detection */
        @media screen and (-webkit-min-device-pixel-ratio:0) {
            @supports (not (-webkit-touch-callout:inherit)) {

                /* Target Android browsers, but not iOS */
                .meet-controls {
                    position: fixed !important;
                    visibility: visible !important;
                    opacity: 1 !important;
                    bottom: 30px !important;
                    /* Higher position to ensure reachability */
                }

                .meet-button {
                    position: relative !important;
                    display: flex !important;
                    opacity: 1 !important;
                    visibility: visible !important;
                    width: 48px !important;
                    /* Larger touch target */
                    height: 48px !important;
                    /* Larger touch target */
                    -webkit-tap-highlight-color: transparent !important;
                }

                .meet-button.active {
                    background-color: #ea4335 !important;
                }
            }
        }

        /* Additional Android SVG fixes */
        @media screen and (max-width: 768px) {

            /* Fix for Android Chrome SVG visibility issues */
            button.meet-button svg {
                display: block !important;
                visibility: visible !important;
                opacity: 1 !important;
                fill: none !important;
                stroke: currentColor !important;
                stroke-width: 2px !important;
                min-width: 24px !important;
                min-height: 24px !important;
            }

            /* Add background color to SVG parent to ensure visibility */
            button.meet-button {
                position: relative !important;
                background-color: #3c4043 !important;
                border-radius: 50% !important;
                display: flex !important;
                align-items: center !important;
                justify-content: center !important;
                width: 48px !important;
                /* Larger size for better tap target */
                height: 48px !important;
                /* Larger size for better tap target */
                margin: 0 6px !important;
                /* Increase space between buttons */
                overflow: visible !important;
                -webkit-tap-highlight-color: transparent !important;
            }

            /* Add active state for touch devices */
            button.meet-button.active,
            button.meet-button:active {
                background-color: #ea4335 !important;
                transform: scale(0.95) !important;
                transition: transform 0.1s ease-out, background-color 0.1s ease-out !important;
            }

            /* Make sure leave button stays red and just changes opacity on touch */
            .meet-button.leave:active,
            .meet-button.leave.touch-active {
                opacity: 0.8 !important;
                transform: scale(0.95) !important;
            }

            /* Fix active state rendering for buttons */
            button.meet-button.active svg,
            button.meet-button:active svg {
                opacity: 1 !important;
                visibility: visible !important;
            }

            /* Increase tap target for mobile and move higher for better reachability */
            .meet-controls {
                /* padding: 8px 10px !important; */
                bottom: 50px !important;
                /* gap: 6px !important; */
            }
        }

        /* Ensure controls are always visible */
        #meetControls {
            display: flex !important;
            visibility: visible !important;
            opacity: 1 !important;
            z-index: 2000 !important;
        }

        /* Additional styles for touch feedback */
        .meet-button.touch-active {
            transform: scale(0.95) !important;
            opacity: 0.9 !important;
        }

        /* Fix for camera-overlay positioning when controls are higher */
        @media (max-width: 576px) {
            .camera-overlay {
                bottom: 120px !important;
                /* Move up to prevent overlap with raised controls */
            }
        }

        /* Add touch-specific active state for buttons */
        @media (hover: none) {

            /* Target touch devices specifically */
            .meet-button:active,
            .meet-button.active,
            .meet-button.touch-active {
                background-color: #ea4335 !important;
                transform: scale(0.95) !important;
                transition: transform 0.1s ease-out, background-color 0.1s ease-out !important;
            }

            /* Make sure leave button stays red and just changes opacity on touch */
            .meet-button.leave:active,
            .meet-button.leave.touch-active {
                opacity: 0.8 !important;
                transform: scale(0.95) !important;
            }

            /* Fix active state rendering for buttons */
            button.meet-button.active svg,
            button.meet-button:active svg {
                opacity: 1 !important;
                visibility: visible !important;
            }
        }

        /* Notification styles */
        .notification {
            position: fixed;
            top: 20px;
            left: 50%;
            transform: translateX(-50%) translateY(-100px);
            z-index: 9999;
            background: rgba(32, 33, 36, 0.9);
            color: white;
            padding: 12px 20px;
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
            max-width: 90%;
            width: auto;
            text-align: center;
            font-size: 14px;
            opacity: 0;
            transition: all 0.3s ease;
            backdrop-filter: blur(5px);
        }

        .notification.showing {
            transform: translateX(-50%) translateY(0);
            opacity: 1;
        }

        .notification-content {
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .notification-info {
            border-left: 4px solid #4285f4;
        }

        .notification-warning {
            border-left: 4px solid #fbbc05;
        }

        .notification-error {
            border-left: 4px solid #ea4335;
        }

        /* Mobile-specific styles for screen sharing button */
        @media (max-width: 768px) {

            /* Hide screen share button on iOS since it's not supported */
            html.ios #shareScreen {
                display: none !important;
            }

            /* Special styling for Android screen share button to indicate it might not work everywhere */
            html.android #shareScreen {
                position: relative;
            }

            html.android #shareScreen::after {
                content: "?";
                position: absolute;
                top: -5px;
                right: -5px;
                background: #fbbc05;
                color: #000;
                border-radius: 50%;
                width: 16px;
                height: 16px;
                font-size: 10px;
                display: flex;
                align-items: center;
                justify-content: center;
                font-weight: bold;
            }
        }

        /* Add these styles to your existing CSS */
        .audio-control-group {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .video-control-group {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .select-wrapper {
            position: relative;
        }

        .meet-select {
            appearance: none;
            background: rgba(60, 64, 67, 0.8);
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: 20px;
            color: white;
            font-size: 14px;
            padding: 8px 32px 8px 12px;
            cursor: pointer;
            transition: all 0.2s ease;
            min-width: 140px;
            backdrop-filter: blur(10px);
        }

        .meet-select:hover {
            background: rgba(95, 99, 104, 0.9);
            border-color: rgba(255, 255, 255, 0.3);
        }

        .meet-select:focus {
            outline: none;
            border-color: #8ab4f8;
            box-shadow: 0 0 0 2px rgba(138, 180, 248, 0.2);
        }

        .select-wrapper::after {
            content: '';
            position: absolute;
            right: 12px;
            top: 50%;
            transform: translateY(-50%);
            width: 12px;
            height: 12px;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255, 255, 255, 0.8)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: center;
            pointer-events: none;
            transition: all 0.2s ease;
            opacity: 0.8;
        }

        .select-wrapper:hover::after {
            opacity: 1;
            transform: translateY(-50%) translateY(1px);
        }

        /* Host controls styling */
        .host-controls {
            display: flex;
            align-items: center;
            gap: 12px;
            padding-left: 12px;
            border-left: 1px solid rgba(255, 255, 255, 0.1);
        }

        .host-controls .meet-button {
            background: rgba(234, 67, 53, 0.8);
        }

        .host-controls .meet-button:hover {
            background: rgba(220, 38, 38, 0.9);
        }

        /* Mobile optimizations */
        @media (max-width: 768px) {
            .meet-controls {
                position: fixed !important;
                left: 5px !important;
                right: 5px !important;
                bottom: auto !important;
                transform: none !important;
                background: rgba(32, 33, 36, 0.98) !important;
                backdrop-filter: blur(20px) !important;
                border-radius: 24px 24px 24px 24px !important;
                box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.2) !important;
                border: none !important;
                z-index: 9999 !important;
                display: flex !important;
                justify-content: space-between !important;
                align-items: center !important;
            }

            .meet-button {
                width: 50px !important;
                height: 50px !important;
                min-width: 50px !important;
                min-height: 50px !important;
                background: rgba(60, 64, 67, 0.95) !important;
                border-radius: 50% !important;
                margin: 0 4px !important;
                transition: all 0.2s ease !important;
                -webkit-tap-highlight-color: transparent !important;
            }

            .meet-button.active {
                background: #ea4335 !important;
                transform: scale(1.05) !important;
            }

            .meet-button.leave {
                background: #ea4335 !important;
                width: 50px !important;
                height: 50px !important;
                min-width: 50px !important;
                min-height: 50px !important;
            }

            .meet-button svg {
                width: 20px !important;
                height: 20px !important;
                stroke-width: 2 !important;
            }

            .audio-control-group,
            .video-control-group {
                display: flex !important;
                align-items: center !important;
                gap: 8px !important;
            }

            .select-wrapper {
                display: none !important;
            }

            .host-controls {
                display: none !important;
            }


            .meet-button:active::after {
                opacity: 1;
            }

            /* Adjust camera overlay position */
            .camera-overlay {
                bottom: 100px !important;
                right: 16px !important;
                width: 90px !important;
                height: 90px !important;
                border-width: 2px !important;
            }
        }

        /* Custom select arrow */
        .select-wrapper::after {
            content: '';
            position: absolute;
            right: 12px;
            top: 50%;
            transform: translateY(-50%);
            width: 12px;
            height: 12px;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255, 255, 255, 0.8)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: center;
            pointer-events: none;
            transition: all 0.2s ease;
            opacity: 0.8;
        }

        .select-wrapper:hover::after {
            opacity: 1;
            transform: translateY(-50%) translateY(1px);
        }

        .meet-select:focus+.select-wrapper::after {
            opacity: 1;
        }

        /* Mobile optimizations */
        @media (max-width: 768px) {
            .meet-select {
                max-width: 180px;
                font-size: 13px;
                padding: 6px 32px 6px 10px;
            }

            .audio-control-group {
                gap: 6px;
            }
        }

        @media (max-width: 480px) {
            .meet-select {
                max-width: 140px;
                font-size: 12px;
            }
        }

        /* Touch device optimizations */
        @media (hover: none) {
            .meet-select {
                padding: 10px 32px 10px 12px;
                /* Larger touch target */
            }
        }

        /* Loading state */
        .meet-select.loading {
            background-image: linear-gradient(90deg,
                    rgba(32, 33, 36, 0.8) 25%,
                    rgba(42, 43, 46, 0.8) 50%,
                    rgba(32, 33, 36, 0.8) 75%);
            background-size: 200% 100%;
            animation: loading 1.5s infinite linear;
        }

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

            100% {
                background-position: -200% 0;
            }
        }


        /* Mobile optimizations */
        @media (max-width: 768px) {
            .meet-select {
                max-width: 180px;
                font-size: 13px;
                padding: 6px 32px 6px 10px;
            }

            .audio-control-group {
                gap: 6px;
            }
        }

        @media (max-width: 480px) {
            .meet-select {
                max-width: 140px;
                font-size: 12px;
            }
        }

        /* Touch device optimizations */
        @media (hover: none) {
            .meet-select {
                padding: 10px 36px 10px 12px;
            }

            .meet-select:active {
                transform: scale(0.98);
                transition: transform 0.1s ease;
            }
        }

        /* Hide overlay text by default */
        .video-overlay,
        .stats-overlay {
            opacity: 0;
            transition: opacity 0.3s ease;
            pointer-events: none;
        }

        /* Show on hover for desktop devices */
        @media (hover: hover) {

            .video-wrapper:hover .video-overlay,
            .video-wrapper:hover .stats-overlay {
                opacity: 1;
            }

            /* Also show camera overlay name on hover */
            .camera-overlay:hover .video-overlay,
            .remote-camera-overlay:hover .video-overlay {
                opacity: 1;
            }
        }

        /* Touch device handling */
        @media (hover: none) {

            .video-wrapper.touch-active .video-overlay,
            .video-wrapper.touch-active .stats-overlay {
                opacity: 1;
            }

            .camera-overlay.touch-active .video-overlay,
            .remote-camera-overlay.touch-active .video-overlay {
                opacity: 1;
            }
        }

        /* Always show room ID when copied */
        #currentRoomId.copied {
            opacity: 1;
        }

        /* Exception for camera disabled state - always show the text */
        .camera-overlay.camera-disabled::after,
        .remote-camera-overlay.camera-disabled::after {
            opacity: 1 !important;
        }

        /* Notification Manager Styles */
        #notification-container {
            position: fixed;
            top: 20px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 9999;
            width: 90%;
            max-width: 400px;
            pointer-events: none;
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .notification {
            position: fixed;
            background: rgba(32, 33, 36, 0.95);
            backdrop-filter: blur(8px);
            border-radius: 8px;
            padding: 12px 16px;
            color: #fff;
            display: flex;
            align-items: center;
            gap: 12px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
            opacity: 0;
            transform: translateY(-20px);
            transition: all 0.3s ease-out;
            pointer-events: auto;
            width: 90%;
            left: 50%;
            transform: translateX(-50%);
            box-sizing: border-box;
            z-index: 9999;
        }

        .notification.visible {
            opacity: 1;
            transform: translateY(0);
        }

        .notification-icon {
            flex-shrink: 0;
            width: 20px;
            height: 20px;
        }

        .notification-content {
            flex-grow: 1;
            font-size: 14px;
            line-height: 1.4;
            margin-right: 8px;
            word-break: break-word;
        }

        .notification-close {
            flex-shrink: 0;
            width: 20px;
            height: 20px;
            border: none;
            background: transparent;
            color: rgba(255, 255, 255, 0.6);
            cursor: pointer;
            padding: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: color 0.2s ease;
        }

        .notification-close:hover {
            color: #fff;
        }

        .notification.info {
            border-left: 4px solid #4285f4;
        }

        .notification.success {
            border-left: 4px solid #34a853;
        }

        .notification.warning {
            border-left: 4px solid #fbbc05;
        }

        .notification.error {
            border-left: 4px solid #ea4335;
        }

        /* Mobile optimizations */
        @media (max-width: 768px) {
            #notification-container {
                top: 10px;
                left: 0;
                right: 0;
                width: calc(100% - 20px);
                padding-left: 10px;
                padding-right: 10px;
                box-sizing: border-box;
            }

            .notification {
                width: 100%;
                max-width: none;
                margin: 0 auto;
                padding: 10px 12px;
                font-size: 13px;
                box-sizing: border-box;
            }

            .notification-icon {
                width: 16px;
                height: 16px;
            }
        }

        /* Safe area insets for modern mobile devices */
        @supports (padding-top: env(safe-area-inset-top)) {
            #notification-container {
                padding-top: env(safe-area-inset-top);
            }
        }

        /* Muted indicator styles */
        .muted-indicator {
            position: absolute;
            bottom: 12px;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(240, 243, 255, 0.743);
            color: #fff;
            padding: 6px 10px;
            border-radius: 4px;
            display: flex;
            align-items: center;
            gap: 6px;
            justify-content: center;
            z-index: 10;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
            backdrop-filter: blur(4px);
            font-size: 13px;
        }

        /* Style for the SVG container */
        .muted-indicator span {
            font-weight: 500;
            display: flex;
            align-items: center;
        }

        /* Control SVG size */
        .muted-indicator svg {
            width: 1.2rem;
            height: 1.2rem;
        }

        /* Remove the pulse animation and red overlay */
        .video-wrapper:has(.muted-indicator)::before {
            display: none;
        }

        /* Add styles for clean exit animation */
        .exiting {
            animation: exit-fade 0.5s ease-out forwards;
        }

        /* Define the exit animation */
        @keyframes exit-fade {
            from {
                opacity: 1;
                transform: translateY(0);
            }

            to {
                opacity: 0;
                transform: translateY(10px);
            }
        }

        /* Mobile/Desktop specific elements */
        .mobile-only {
            display: none !important;
        }

        .desktop-only {
            display: block;
        }

        /* Show/hide elements based on device type */
        html.mobile .mobile-only {
            display: flex !important;
        }

        html.mobile .desktop-only {
            display: none !important;
        }

        /* Mobile-friendly select styles */
        html.mobile .select-wrapper {
            max-width: 120px;
            margin: 0 4px;
        }

        html.mobile .meet-select {
            height: 40px;
            padding: 0 24px 0 8px;
            font-size: 14px;
            border-radius: 20px;
            -webkit-tap-highlight-color: transparent;
            touch-action: manipulation;
            background-color: rgba(60, 64, 67, 0.95);
            /* Ensure darker background on mobile */
            border: 1px solid rgba(255, 255, 255, 0.3);
            text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
        }

        html.mobile .select-wrapper::after {
            right: 8px;
            width: 8px;
            height: 8px;
            opacity: 1;
            /* Ensure dropdown arrow is visible */
        }

        @media (max-width: 360px) {
            html.mobile .select-wrapper {
                max-width: 100px;
            }

            html.mobile .meet-select {
                font-size: 13px;
                padding: 0 20px 0 6px;
            }
        }

        /* Switch camera button styles */
        #switchCamera {
            margin-left: 8px;
        }

        #switchCamera svg {
            transform-origin: center;
            transition: transform 0.3s ease;
        }

        #switchCamera.switching svg {
            transform: rotate(180deg);
        }

        /* Control group spacing */
        .video-control-group {
            display: flex;
            align-items: center;
            margin-left: 8px;
        }

        .audio-control-group {
            display: flex;
            align-items: center;
            margin-right: 8px;
        }

        #toggleVideo {
            margin-right: 8px;
        }

        @media (max-width: 360px) {
            html.mobile .select-wrapper {
                max-width: 100px;
            }

            html.mobile .meet-select {
                font-size: 13px;
                padding: 0 20px 0 6px;
            }

            .video-control-group,
            .audio-control-group {
                margin-left: 4px;
                margin-right: 4px;
            }

            #toggleVideo {
                margin-right: 4px;
            }
        }