:root {
            --primary: #6366f1;
            --secondary: #ec4899;
            --dark: #0f172a;
            --glass: rgba(255, 255, 255, 0.1);
            --border: rgba(255, 255, 255, 0.2);
        }

        * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', sans-serif; }

        body {
            background: var(--dark);
            color: white;
            height: 100vh;
            overflow: hidden;
            display: flex;
            justify-content: center;
            align-items: center;
            position: relative;
        }

        /* Animated Background */
        .blobs {
            position: absolute;
            top: 0; left: 0; width: 100%; height: 100%;
            z-index: -1;
            filter: blur(80px);
            opacity: 0.6;
        }
        .blob {
            position: absolute;
            border-radius: 50%;
            animation: float 10s infinite ease-in-out;
        }
        .blob:nth-child(1) { width: 400px; height: 400px; background: var(--primary); top: -100px; left: -100px; }
        .blob:nth-child(2) { width: 300px; height: 300px; background: var(--secondary); bottom: -50px; right: -50px; animation-delay: 2s; }
        .blob:nth-child(3) { width: 200px; height: 200px; background: #8b5cf6; top: 50%; left: 50%; transform: translate(-50%, -50%); animation-duration: 15s; }

        @keyframes float {
            0%, 100% { transform: translate(0, 0); }
            50% { transform: translate(30px, -30px); }
        }

        /* Glassmorphism Card */
        .container {
            width: 100%;
            max-width: 400px;
            padding: 2rem;
            background: var(--glass);
            -webkit-backdrop-filter: blur(16px);
            backdrop-filter: blur(16px);
            border: 1px solid var(--border);
            border-radius: 24px;
            text-align: center;
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
            transition: all 0.5s ease;
            animation: slideUp 0.6s ease-out;
        }

        @keyframes slideUp {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }

        h1 {
            font-size: 2rem;
            margin-bottom: 0.5rem;
            background: linear-gradient(to right, #fff, #cbd5e1);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        p { color: #94a3b8; margin-bottom: 2rem; }

        input {
            width: 100%;
            padding: 12px 16px;
            background: rgba(0, 0, 0, 0.3);
            border: 1px solid var(--border);
            border-radius: 12px;
            color: white;
            font-size: 1rem;
            margin-bottom: 1rem;
            transition: 0.3s;
            outline: none;
        }
        input:focus { border-color: var(--primary); box-shadow: 0 0 15px rgba(99, 102, 241, 0.3); }

        button {
            width: 100%;
            padding: 12px;
            border: none;
            border-radius: 12px;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: transform 0.2s, box-shadow 0.2s;
            margin-bottom: 1rem;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

        .btn-primary {
            background: linear-gradient(135deg, var(--primary), #4f46e5);
            color: white;
        }
        .btn-secondary {
            background: rgba(255, 255, 255, 0.1);
            color: white;
            border: 1px solid var(--border);
        }
        .btn-green {
            background: linear-gradient(135deg, #10b981, #059669);
            color: white;
        }

        button:hover { transform: translateY(-2px); box-shadow: 0 10px 20px -10px rgba(0,0,0,0.5); }
        button:active { transform: scale(0.98); }

        /* Video Room UI */
        .room-ui {
            display: none; /* Hidden by default */
            flex-direction: column;
            width: 95vw;
            height: 90vh;
            max-width: 1200px;
            animation: fadeIn 0.5s ease;
        }

        @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

        .header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 1rem;
            background: var(--glass);
            border-radius: 16px;
            margin-bottom: 1rem;
            border: 1px solid var(--border);
        }

        .room-info {
            display: flex;
            align-items: center;
            gap: 10px;
            background: rgba(0,0,0,0.3);
            padding: 8px 16px;
            border-radius: 8px;
            cursor: pointer;
        }
        .room-info:hover { background: rgba(255,255,255,0.1); }

        .video-grid {
            flex: 1;
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 1rem;
            position: relative;
        }

        video {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 16px;
            background: #1e293b;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
            transition: transform 0.3s;
        }

        /* Controls Bar */
        .controls {
            display: flex;
            justify-content: center;
            gap: 1rem;
            margin-top: 1rem;
            padding: 1rem;
            -webkit-backdrop-filter: blur(10px);
            backdrop-filter: blur(10px);
            background: var(--glass);
            border-radius: 20px;
            backdrop-filter: blur(10px);
        }

        /* Extracted inline styles */
        .divider-wrapper { margin: 20px 0; position: relative; opacity: 0.5; }
        .divider-hr { border: 0; border-top: 1px solid white; }
        .or-badge { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: #162032; padding: 0 10px; font-size: 12px; }
        .btn-connect { width: auto; padding: 0 20px; border-radius: 30px; }

        .ctrl-btn {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            margin: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.2rem;
            background: rgba(255,255,255,0.1);
            color: white;
        }
        .ctrl-btn.danger { background: #ef4444; }
        .ctrl-btn.danger:hover { background: #dc2626; }
        .ctrl-btn.active { background: white; color: var(--dark); }

        /* Toast Notification */
        .toast {
            position: fixed;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%) translateY(100px);
            background: #10b981;
            color: white;
            padding: 10px 20px;
            border-radius: 30px;
            opacity: 0;
            transition: 0.3s;
        }
        .toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
        .device-wrapper {
    position: relative;
}

.device-select {
    position: absolute;
    bottom: 65px;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    padding: 6px;
    width: 180px;
    z-index: 100;
}

/* ===== Google-Meet Style Control Bar ===== */

.controls {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20, 24, 45, 0.9);
    backdrop-filter: blur(15px);
    padding: 10px 18px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    z-index: 50;
}

.ctrl-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #2a2f4f;
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: 0.2s;
}

.ctrl-btn:hover {
    background: #3b4070;
    transform: scale(1.05);
}

.ctrl-btn.danger {
    background: #ef4444;
}

.ctrl-btn.danger:hover {
    background: #dc2626;
}

.btn-connect {
    background: #22c55e;
    color: white;
    padding: 10px 22px;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
    transition: 0.2s;
}

.btn-connect:hover {
    background: #16a34a;
    transform: scale(1.05);
}

.device-wrapper {
    position: relative;
}

.device-select {
    position: absolute;
    bottom: 90px;                 /* was 60px, now higher */
    left: 50%;
    transform: translateX(-50%);
    background: #1e223a;
    color: white;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    padding: 10px;
    width: 220px;
    font-size: 0.85rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.6);
    z-index: 200;
    animation: popUp 0.15s ease-out;
}

@keyframes popUp {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
/* ===== Chat System ===== */

.chat-toggle {
    position: fixed;
    right: 25px;
    bottom: 25px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #4f46e5;
    color: white;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
    z-index: 80;
}

.chat-panel {
    position: fixed;
    right: -320px;
    top: 0;
    width: 320px;
    height: 100vh;
    background: rgba(20,24,45,0.95);
    backdrop-filter: blur(15px);
    display: flex;
    flex-direction: column;
    transition: 0.3s ease;
    z-index: 100;
}

.chat-panel.open {
    right: 0;
}

.chat-header {
    padding: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255,255,255,0.05);
    font-weight: bold;
}

.chat-header button {
    background: transparent;
    color: white;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
}

.chat-messages {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    font-size: 0.85rem;
}

.chat-message {
    margin-bottom: 8px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    max-width: 80%;
}

.chat-message.self {
    background: #4f46e5;
    margin-left: auto;
}

.chat-input {
    display: flex;
    padding: 10px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.chat-input input {
    flex: 1;
    padding: 8px;
    border-radius: 20px;
    border: none;
    outline: none;
}

.chat-input button {
    margin-left: 6px;
    background: #22c55e;
    border: none;
    padding: 8px 14px;
    border-radius: 20px;
    color: white;
    cursor: pointer;
}

